hreflang tells search engines which language and region each version of a page targets. It's powerful — and the most error-prone area in technical SEO, because it demands strict reciprocity and accuracy. Here's every rule, and every way it breaks.
If you publish the same content for multiple languages or regions, hreflang ensures the right version reaches the right user — and stops your versions being treated as duplicates of each other.
You need hreflang when you have, say, English for the US and the UK, or Turkish and English versions of an article. Each version annotates all the others — in the HTML head, HTTP headers, or the sitemap — declaring its language (and optionally region). Done right, a Turkish searcher gets the Turkish page and an American searcher gets the US page, with no duplicate-content confusion. Done wrong, the wrong-language page can rank, or your versions compete against each other. The difficulty is that hreflang only works when the whole cluster is consistent and reciprocal.
Each rule below maps to a real hreflang check. Break one and the cluster can fail.
hreflang must be mutual: if A points to B, B must point back to A. A missing return tag is the most common hreflang error and can make search engines ignore the annotation. The audit flags missing reciprocal hreflang.
Every page must include an hreflang entry for itself. Without a self-reference, the cluster is incomplete. The audit flags pages missing a self-reference hreflang.
Use ISO 639-1 language codes (e.g. en, tr) and, where used, ISO 3166-1 region codes (e.g. en-GB, en-US). Invalid or made-up codes break the annotation. The audit flags invalid hreflang codes and language mismatches between the tag and the page's actual language.
Provide an x-default for the fallback when no version matches. Don't list multiple conflicting entries for the same language. And every hreflang target must be canonical and return 200 — pointing at a redirect, a 404, or a non-canonical URL breaks it. The audit flags missing x-default, multiple entries per language, broken (non-200) targets, and hreflang pointing to non-canonical URLs.
A few disciplines that prevent most hreflang failures.
Generate it programmatically rather than hand-maintaining tags, so reciprocity and self-references are guaranteed. Keep it aligned with canonicals — hreflang and canonical must agree on which URL is the version; a contradiction between them is a frequent, confusing bug that overlaps with indexability. Point only at indexable, 200, canonical URLs.Include x-default for users outside your targeted locales. Set the html lang attribute to match — the audit flags missing or invalid html lang and language mismatches. Re-validate after changes, because one edited or removed URL can break the whole cluster's reciprocity.
Any of the three works; pick one and be consistent. HTML head tags are easiest to inspect; the XML sitemap method scales well for large sites and keeps page markup lighter; HTTP headers suit non-HTML files. Don't mix methods for the same pages, which can create conflicts.
Language-only (e.g. en) is enough if you don't target specific regions. Add a region (e.g. en-GB vs en-US) only when you have genuinely different versions per region. Adding region codes you don't need just creates more reciprocity to maintain and more to break.
It doesn't boost rankings — it controls which version is served and prevents your localised pages being treated as duplicates. The benefit is showing the right page to the right user, which improves relevance and reduces the chance your versions cannibalise each other.
Free to start. Find broken return tags, invalid codes, missing x-defaults and non-200 targets.
Start my free audit