Hreflang Validator
Free hreflang checker: find invalid language and country codes, missing return tags, missing x-default and broken alternate URLs on any page.
Still loading. If the tool doesn’t appear, reload this page.
About this tool
Hreflang Validator
Check hreflang tags for invalid language and country codes, missing return tags, missing x-default, self-references and broken alternate URLs.
A hreflang validator checks the tags that tell Google which language and country version of a page to show each searcher. Enter a URL and this tool reads every hreflang annotation from the HTML head and the HTTP Link header, validates each code against ISO 639-1 languages and ISO 3166-1 countries (catching mistakes like en-UK, jp or en_US), checks for a self-reference, x-default, conflicting and relative URLs, then opens every alternate page to confirm it loads, is indexable, is self-canonical and links back. You get a score, a fix for every problem and a corrected tag set to copy.
How to use Hreflang Validator
- 1
Enter the URL of one language version of your page, or switch to Paste hreflang tags for a staging site.
- 2
Press Validate hreflang. The tool reads the page's hreflang tags and HTTP Link header.
- 3
It then fetches each alternate URL and checks status, noindex, canonical and the return link to your page.
- 4
Read the score and findings; each error explains what Google does with it and how to fix it.
- 5
Copy the corrected tags or the text report for your developer.
Why use Hreflang Validator
Return tags checked for real
Every alternate page is opened to confirm it links back, which is the most common reason Google ignores hreflang.
Code mistakes caught with the fix
Country codes used as languages (jp, cn, se), en-UK, underscores and UN region codes like es-419 are flagged with the correct value.
Canonical and noindex conflicts
Alternates that are noindex, redirect or canonicalise elsewhere are called out, because they silently break the set.
What is hreflang?
Hreflang is an HTML attribute (rel="alternate" hreflang="x") that tells search engines a page has versions in other languages or for other regions, and which URL is which. Google and Yandex use it to show the right version in search results; it does not change ranking, it swaps in the best-matching URL. Bing relies mainly on the content-language meta tag and the html lang attribute instead.
A valid value is an ISO 639-1 language code (en, de, ja), optionally followed by an ISO 3166-1 alpha-2 region (en-GB, es-MX, pt-BR) or a script (zh-Hant). The special value x-default names the fallback page for everyone else. Region alone (GB) is not valid.
The most common hreflang errors
Missing return tags: page A lists page B but B does not list A, so Google ignores the pair. Wrong codes: en-UK (should be en-GB), jp (ja), cn (zh), kr (ko), se (sv), dk (da), underscores like en_US, and three-letter codes. Relative URLs: hreflang needs absolute URLs with https:// and the domain.
Conflicts with other signals: an alternate that redirects, returns 404, is noindex, or has a canonical pointing to another language. Tags outside the head: an invalid element early in the head (an image, a div, some tracking snippets) makes browsers and Google close the head early, so later hreflang tags are ignored.
Correct hreflang example
Every version carries the full set, including itself: <link rel="alternate" hreflang="en" href="https://example.com/" /> <link rel="alternate" hreflang="en-GB" href="https://example.com/uk/" /> <link rel="alternate" hreflang="de" href="https://example.com/de/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />. The same set goes on /uk/ and /de/.
Common use cases
- An international SEO checks why Google shows the US page to UK searchers and finds en-UK instead of en-GB.
- A developer launching a German version confirms every page links back to the English original before go-live.
- An agency audits a multi-country store and finds alternates that redirect or canonicalise to another language.
Frequently asked questions
How do I check if hreflang is working?
Enter one language version of the page in this hreflang validator. It checks the codes, self-reference and x-default, then fetches every alternate URL to confirm it returns 200, is indexable, is self-canonical and links back. All green means Google can use the set; Search Console's International Targeting report was retired, so a crawler check like this is the practical way.
Link to answerWhat is a hreflang return tag?
It is the link back. If the English page lists the German page as hreflang="de", the German page must also list the English page. Hreflang only works in pairs that confirm each other, so a missing return tag makes Google ignore that annotation.
Link to answerIs en-UK a valid hreflang code?
No. The ISO 3166-1 code for the United Kingdom is GB, so use en-GB. UK is reserved and not accepted; uk on its own is the language code for Ukrainian.
Link to answerDo I need x-default?
It is optional but recommended. x-default tells Google which URL to show users whose language or country matches none of your versions, usually a language selector or your main international page.
Link to answerShould hreflang be in the HTML, the HTTP header or the sitemap?
Any one of the three works, and Google treats them equally. HTML link tags are easiest to check; HTTP Link headers suit PDFs; XML sitemaps suit large sites. Use one method consistently rather than mixing them.
Link to answerDoes hreflang need to be self-referencing?
Google recommends it: each page should include a hreflang tag pointing to itself alongside the other versions. Without it the set is still read, but a self-reference removes ambiguity and is part of most validators' checks.
Link to answerCan I use es-419 for Latin American Spanish?
Google's hreflang only accepts ISO 3166-1 alpha-2 country codes, so UN M.49 region codes such as 419 are not supported. Use plain es, or list the main countries (es-MX, es-AR, es-CO).
Link to answer