Home / Hreflang checker
Hreflang checker
Read a page's hreflang annotations from the HTML head and the HTTP Link header, validate every language and region code, and check that the alternates link back.
The rules this checker applies
From Google Search Central's localized versions guide:
- Codes are an ISO 639-1 language, optionally followed by an ISO 3166-1 alpha-2 region:
de,de-AT. A region on its own is not valid. - Each version lists every version, including itself.
- Links must be bidirectional: if A points to B, B must point back to A.
- URLs are fully qualified, and should be the canonical URL of each version.
x-defaultmarks the fallback for users who match no listed language.- Declare with
<link rel="alternate" hreflang>in the head, an HTTPLinkheader, or the XML sitemap. This tool reads the first two.
Classic mistakes
| Wrong | Right | Why |
|---|---|---|
| en-UK | en-GB | UK is not an ISO country code |
| jp | ja | jp is a country; the language is ja |
| en_US | en-US | hyphen, not underscore |
| es-419 | es-MX, es-AR… | Google doesn't support region groups |
| eu | en | eu is Basque, not "Europe" |
Questions
Does hreflang affect rankings?
Not directly. It tells Google which language or regional URL to show a given searcher, so the right version appears in results. Without it, a French user may land on the English page.
Is x-default required?
No. Google recommends it for a page that serves users whose language is not listed, such as a language selector or an international homepage.
Should hreflang URLs match the canonical?
Yes. Each language version should be self-canonical and hreflang should list those canonical URLs. Pointing a French page's canonical at the English page tells Google the French one is a duplicate, and its hreflang may then be ignored.
Why are my sitemap hreflang tags not shown?
This tool reads the page's HTML head and HTTP headers. Hreflang in an XML sitemap is equally valid for Google but lives in a separate file.