About Hreflang Tag Checker
Hreflang tells Google which language or regional version of a page to show to whom. One wrong code, such as en-UK, and that tag has no effect. One version that forgets to link back, and Google ignores the pair. Nothing visibly breaks, so the usual symptom is German visitors landing on the English page.
Missing return links are the first mistake Google lists, and they sit on the other pages, so this tool goes and looks: it fetches each alternate and tests whether that page points back to yours.
You get a lead finding, a table of every version with its language name and its return link result, a list of fixes, and a corrected set of tags when the mistake can be fixed automatically.
How it works
Tags are read from link rel="alternate" elements with an hreflang attribute and from the HTTP Link header, and each code is checked against Google's documented format: an ISO 639-1 language, optionally an ISO 15924 script, optionally an ISO 3166-1 Alpha 2 country. Codes are case-insensitive.
The common mistakes get specific messages. An underscore, as in en_GB, gets a corrected code. A country on its own, such as jp, is rejected because the first code is always a language. UK, EU and UN as regions are rejected because Google says they have no effect, and numeric regions like es-419 because Google says they are not supported. Valid codes that were probably not intended are flagged too: ca means Catalan, not Canada.
With a live URL, the tool then requests up to 8 of the other versions, three at a time, and reads their tags and Link headers. A version that lists this page is marked as linking back, ignoring a trailing slash. It also compares this page's own canonical with its address, since Google asks that a canonical stays in the same language.
How to use Hreflang Tag Checker
- Type the address into Page to check and press Check hreflang. Each version is fetched, so this can take a few seconds.
- Press Try a set with mistakes to see the results on a built-in example.
- To check tags before they go live, choose Paste HTML and paste the page or just its head. Fill in This page's address (optional) to test the self-reference and return links as well.
- Read Language versions, then work through What to fix.
- If Corrected tags appears, use Copy tags, and put the same set on every version.
The built-in example, checked as /en/desks, with its built-in answers
<link rel="alternate" hreflang="en" href="https://example.com/en/desks">
<link rel="alternate" hreflang="en_GB" href="https://example.com/uk/desks">
<link rel="alternate" hreflang="de" href="https://example.com/de/desks">
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr/desks">
<link rel="alternate" hreflang="ca" href="https://example.com/ca/desks">
<link rel="alternate" hreflang="x-default" href="https://example.com/desks">"en_GB" is not a valid hreflang code
What to do: Change it to "en-GB".
en English This page
en_GB Not recognised Links back
de German Does not link back
fr-FR French (France) Answers 404
ca Catalan No hreflang tags
x-default Everyone else (fallback) Links backThe ca line reads as Catalan because that is what the code means. If it was meant for Canada, it should be en-CA or fr-CA. The example's other pages are built in, so nothing is fetched.
When it helps
- Testing a set of tags before deploying it, by pasting the head.
- Checking a new language launch, when only some of the versions have the full set of tags.
- Investigating why people in one country keep landing on another country's page.
Tips for a better result
- Put the complete set, including the page itself, on every version. Generating it from one list in your template keeps them from drifting apart.
- If you have
en-GBanden-US, add a plainenfor English speakers elsewhere. One of the regional pages can do that job with a second tag. - Choose one method, HTML tags, HTTP headers or a sitemap. Google treats them as equivalent, and using more than one only adds places to go wrong.
Good to know
- Tags in an XML sitemap are not read, so a page that uses only a sitemap shows no tags here. Use the sitemap analyzer to look at the sitemap itself.
- It reads the HTML as served, so tags added by JavaScript are not seen, on this page or on the versions it visits.
- It checks the links between this page and each version. It does not test every pair among the others, so run it on each version for a complete picture.
- At most 8 other versions are checked per run, and the table marks the rest as Not checked. Pasted HTML is only followed up when you give the page's address.
Questions people ask
Why does Google ignore my hreflang tags?
Start with the return links. Google says that if two pages do not both point to each other, the tags will be ignored. Invalid codes, relative addresses and tags outside the head are the next things to check.
Is en-UK a valid hreflang code?
No. The ISO country code for the United Kingdom is GB, so the right value is en-GB. Google lists UK, EU and UN as regions that have no effect, and this tool offers the corrected code when it finds en-UK.
Can I target a country without saying the language?
No. The first code is always the language, and Google says a country cannot be given on its own. To reach Belgium, write nl-BE or fr-BE, because plain be means Belarusian.
What to use next
- Canonical URL Checker: because a canonical pointing to another version can undo these tags
- XML Sitemap Analyzer: if your hreflang lives in the sitemap rather than the page
- Redirect Chain Checker: when an alternate address redirects
Last reviewed . Read our editorial policy.