The problem: hreflang is easy to add and easy to get silently wrong
If your site serves more than one language or region, hreflang tags tell Google which version to show
which user. The catch: a broken hreflang setup doesn't throw an error — it just quietly fails, so the wrong
language ranks in the wrong country and you never see a warning. The mistakes are subtle (a two-letter code
here, a missing reciprocal link there), which is exactly why you validate them before deploying rather than
waiting weeks for Search Console to flag it.
Fastest path: paste your page HTML and check
Paste your page's <head> (or the full HTML) into the Hreflang Tag Checker.
It parses every hreflang annotation and flags missing x-default, duplicate locales, relative URLs, and
invalid language codes — the errors below — so you catch them at your desk, not in production.
A correct set for an English/Spanish site looks like this:
<link rel="alternate" hreflang="en" href="https://example.com/page" />
<link rel="alternate" hreflang="es" href="https://example.com/es/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page" />
The 5 errors that actually break hreflang
1. Missing x-default
x-default is the fallback for users whose language/region matches none of your versions. Google recommends
it, and without it those users get an arbitrary version. Point it at your primary or a language-selector page.
2. Non-reciprocal (one-way) links
Hreflang must be bidirectional. If page A says "B is my Spanish version," page B must say "A is my English version." If B doesn't link back to A, Google ignores the annotation entirely. This is the single most common hreflang failure, and it's invisible unless you check both pages.
3. Wrong language/region codes
Codes must be valid ISO 639-1 language and optional ISO 3166-1 Alpha-2 region — and the format trips people up:
en-GBis correct;en-UKis not (the country code is GB, not UK).- Language is lowercase, region uppercase:
pt-BR, notpt-brorPT-br. - Don't invent region-only codes — hreflang is
languageorlanguage-REGION, never region alone.
4. Relative URLs
Hreflang href values must be absolute (https://example.com/es/page), never relative (/es/page).
Relative URLs are silently ignored, so the annotation does nothing.
5. Duplicate or conflicting entries
Two hreflang="es" tags pointing at different URLs, or the same URL claimed by two languages, makes Google
discard the conflicting set. Each language/region should appear exactly once.
Gotchas beyond the tags themselves
- hreflang and canonical must agree. Each language version should have a self-referencing canonical, not a canonical pointing at another language — a canonical to the English page tells Google to drop the Spanish one. Verify with a canonical checker.
- You can deliver hreflang three ways — HTML
<link>tags, HTTP headers, or XML sitemap entries. Pick one and be consistent; mixing them for the same URLs invites conflicts. - Every page in the set must be indexable. An hreflang pointing at a
noindexor redirected page wastes the annotation. - Self-reference is required. The set for a page must include the page itself.
Summary
- hreflang fails silently, so validate before you ship — paste your HTML into the Hreflang Tag Checker.
- The five killers: missing
x-default, non-reciprocal links, wrong codes (en-GBnoten-UK), relative URLs, and duplicates. - Keep canonicals self-referencing and every version indexable.
- Generating tags from scratch? Use the Hreflang Tag Generator, then check the output here before deploying.