What the checker validates
- Codes — language in ISO 639-1 (en, es, de), optionally followed by a region in ISO 3166-1 (en-gb, es-mx). Common mistakes such as en-uk are flagged.
- Self-reference — each page must list itself.
- x-default — the fallback page for users whose language is not listed.
- Duplicates — one URL per code.
- Return links — each alternate page must link back; otherwise Google ignores the pair.
- Status — alternates must return 200, not redirects or errors.
Example
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/">
<link rel="alternate" hreflang="en-us" href="https://example.com/us/">
<link rel="alternate" hreflang="x-default" href="https://example.com/">
Hreflang tags can also be set in the HTTP Link header (useful for PDFs) or in an XML sitemap. This tool checks the HTML and the HTTP header.
Frequently asked questions
Is en-UK a valid hreflang code?
No. The ISO country code for the United Kingdom is GB, so use en-gb.
Do I need x-default?
It is optional but recommended. It tells Google which page to show when none of your language versions match the user.
Why are my hreflang tags ignored?
The most common reason is missing return links: every page in the set must reference every other page, including itself.

