Hreflang checker
Hreflang tells Google which language version to show in which country. One wrong code or a missing return link and Google ignores the pair. Check a page before you blame translations.
Online checks send only the address to the IndexFix Tools server, which downloads that public page and passes the answer back. Nothing is stored.
Your data stays in your browser. Nothing is uploaded or stored.
How to use it: Hreflang checker
- Enter the URL of one language version and click Load page, or paste the page's HTML source.
- Leave Check return links on to open the alternate pages (up to 20).
- Click Check hreflang.
- Read the notes column: invalid codes, relative URLs and duplicates come first.
- Fix the template that prints the tags, then check one page per language again.
Key facts
- Hreflang values use an ISO 639-1 language code, optionally followed by an ISO 3166-1 alpha-2 region code, such as en-GB.
- Each language version should list itself and every other version.
- If page A points to page B, page B must point back to A, or Google may ignore the annotation.
- x-default marks the page for users whose language or region matches none of the versions.
Where to get the data
A live page
The tool downloads the public page through the IndexFix Tools server and reads the tags in the head and the Link header. Pages behind a login or a bot check can't be loaded.
Pasted HTML
Copy the page source (View source in the browser) and paste it. Without a page URL the self-reference and return links can't be checked.
Sitemaps with hreflang
This tool reads page tags. If your hreflang lives only in the XML sitemap, check a page anyway: it shows what users and crawlers see in the HTML.
The three ways to declare hreflang
Google accepts HTML link elements in the head, the HTTP Link header (useful for PDFs) and the XML sitemap. Use one method per page; mixing them makes errors harder to find.
The most common mistakes
en-UK instead of en-GB, a country code used alone (us), underscores (en_US), relative URLs, tags placed in the body, and alternates that redirect or carry a noindex. Each of them can make Google drop the annotation.
Hreflang and canonical
Each language version should be canonical to itself. If the French page sets the English page as canonical, Google treats it as a duplicate and the hreflang pair has nothing to point to.
Next step
When the language versions are fixed, check which pages are indexed to see which of them Google has picked up.
Questions and answers
Is x-default required?
No, but it is recommended. It tells Google which page to show to users whose language you don't cover, often a language selector or the English version.
Can I use a region without a language?
No. The region is optional, the language is not: es-MX and es are valid, MX alone is not.
Why does a return link show as missing?
The alternate page doesn't list the checked URL in its own hreflang tags, it redirects, returns an error or is blocked by noindex. Open it and compare the URLs exactly, including https, www and the trailing slash.
Does hreflang affect rankings?
It doesn't make a page rank higher. It helps Google swap in the right language version of a page that already ranks.
Sources
- Tell Google about localized versions of your page — Google Search Central: https://developers.google.com/search/docs/specialty/international/localized-versions
- ISO 639 language codes — Library of Congress: https://www.loc.gov/standards/iso639-2/php/code_list.php
- ISO 3166 country codes — ISO: https://www.iso.org/iso-3166-country-codes.html