Hreflang is an HTML attribute that tells search engines which language or regional version of a page to serve to each user. If your site publishes the same content for, say, the US, the UK, and Germany, hreflang tags point Google to the right version based on the visitor’s language and location. Get them right and the correct page reaches the correct audience; get them wrong, and Google quietly ignores them.
Why hreflang still trips up experienced teams
Hreflang looks simple in a single example and gets complicated fast at scale. On client audits, the same handful of errors show up again and again, and almost all of them cause Google to discard the tags entirely. The attribute does not “mostly work” when it is broken. It either reciprocates cleanly across every version or it fails. That all-or-nothing behavior is what makes hreflang worth understanding properly rather than copying a snippet and hoping.
This is a glossary page, so we will give you the mechanics. But the reason we keep this entry on our site is practical: we run a multilingual site ourselves (this page exists in English and Turkish), so hreflang is not abstract for us. The errors below are the ones we have hit and fixed, not a generic checklist.
How to implement hreflang: three methods
You can declare language and region versions in three places. Pick one and stay consistent.
- HTML head. Add a link element for each version in the page head: <link rel=”alternate” hreflang=”en-gb” href=”https://example.com/gb/page” />
- HTTP headers. Useful for non-HTML files like PDFs, where you cannot add a head element.
- XML sitemap. Best for large sites, because you manage all the mappings in one file instead of editing every page head.
The hreflang value is a language code (en), optionally with a region code (en-gb, en-us, de). The href must be the fully qualified URL, including https.
A complete example
<link rel=”alternate” href=”https://example.com/en/page” hreflang=”en” />
<link rel=”alternate” href=”https://example.com/gb/page” hreflang=”en-gb” />
<link rel=”alternate” href=”https://example.com/us/page” hreflang=”en-us” />
<link rel=”alternate” href=”https://example.com/de/page” hreflang=”de” />
<link rel=”alternate” href=”https://example.com/” hreflang=”x-default” />
The x-default value is the fallback for users whose language does not match any version. It is optional but strongly recommended, because without it Google has no instruction for the long tail of unmatched visitors.
The three errors that break hreflang most often
Missing return tags (non-reciprocal links). Every version must link to itself and to all other versions, and every version must link back. If page A points to page B but B does not point to A, Google ignores the relationship. This is the single most common hreflang failure we see. The rule is mutual: the set only works when every page references the full set, itself included.
Wrong language or country codes. Use valid ISO codes. A frequent slip is using a country code where a language code belongs, for example en-uk instead of the correct en-gb (UK is not the ISO country code; GB is). Invalid codes are silently dropped.
Relative or non-qualified URLs. The href must be absolute and include the protocol. Relative paths and missing https break the tag.
A useful mental model: hreflang is a semantic triple Google reads as “this URL serves this language to this region.” If any of the three parts is malformed or unreciprocated, the statement is void.
How we validate it
After implementing or auditing hreflang, validate before trusting it. Google Search Console’s International Targeting report flags missing return tags. A Screaming Frog crawl with the hreflang configuration enabled lists every mismatch across the site in one export, which is how we catch reciprocity errors at scale. For a single page, viewing source and confirming each alternate URL resolves and reciprocates is enough.
For the wider strategy around multi-region sites, our colleague Emre Ercan’s guide on building an international SEO strategy covers the architecture decisions that sit above the tags themselves.
FAQ
What does hreflang do? It tells search engines which language or regional version of a page to serve a given user, so a UK visitor sees the en-gb page and a German visitor sees the de page, even when the content is otherwise similar.
Why is Google ignoring my hreflang tags? Almost always because the tags are not reciprocal. Every language version must reference itself and every other version, and each must link back. Missing return tags, invalid ISO codes, and non-absolute URLs are the three usual causes.
Is en-uk a valid hreflang value? No. The correct code for the United Kingdom is en-gb, because GB is the ISO country code, not UK. Using en-uk causes Google to drop the tag.
Which hreflang method is best for a large site? The XML sitemap method, because it centralizes every mapping in one file instead of requiring head edits on every page, which is far easier to maintain and audit at scale.

