How hreflang goes wrong
hreflang tells Google that several URLs are the same page in different languages or for different countries. It only works as a set: every page in the group has to agree about every other page. One typo, one missing return link or one redirect and Google can drop the annotations for that pair. Most sites never notice, because nothing visibly breaks. The wrong language version just shows up in search.
What we check
- Codes. Language first, in ISO 639-1 (
en,ja, notjp), then an optional script likeHant, then an optional ISO 3166-1 country (GB, notUK). Underscores (en_US) are flagged. - Absolute URLs. Google requires the full
https://URL in every entry. - Self-reference and x-default. The page must list itself. x-default is optional; it names the fallback for everyone else.
- Duplicates. One code pointing at two URLs is a conflict Google can’t resolve.
- Return links. We fetch up to five alternates and check each one returns 200, doesn’t redirect, and lists this page back.
- Canonical. Each language version should be canonical to itself. A canonical to the English page tells Google to drop the translation.
A setup that stays correct
- Generate hreflang from one list of locales and URLs, the same list that builds your language switcher.
- Output the full set, including the page itself, on every page in the group.
- Use final URLs only. If you change a URL pattern, update the list, not a redirect.
- Choose one method: HTML tags, HTTP headers or the sitemap. Mixing them adds places for mistakes.
To write a correct set from scratch, use the hreflang generator. It outputs HTML tags, sitemap entries or headers from the same rows.
Limits
We read server HTML (no JavaScript), check up to five alternates per run and can’t see sitemap-based hreflang. Search Console removed its International Targeting report, which listed hreflang errors, in 2022, so a direct check like this one is now the practical way to catch mistakes.