Hreflang checker: the language versions of a page
A hreflang checker reads the hreflang annotations of a page and tests them against Google’s rules. Enter a URL to see every language version the page declares in the HTML and in the HTTP Link header and whether the codes are valid. The check also shows whether x-default and the self-reference are present and whether the alternate pages answer 200 and link back. Free, without registration.
What the hreflang checker tests
- Every
hreflangannotation of the page:<link rel="alternate" hreflang="…">in the HTML head andrel="alternate"entries in the HTTPLinkheader, each shown with its source. - Valid codes: a language in ISO 639-1 format, optionally followed by a region in ISO 3166-1 Alpha 2 format (
de-AT,en-GB), orx-default. Common mistakes such asen-UKandbg_BGare flagged. - The self-reference: the page should list itself among its language versions.
x-default– the version for visitors whose language or region is not listed. It is recommended, not required.- Codes that point to two different addresses, and addresses without the protocol and host (relative), which Google does not accept.
- The canonical of the page: whether it points to another language version. Then search engines may ignore the hreflang set.
- Up to 10 alternate pages are opened: whether each answers 200 directly (without a redirect), whether it has
noindex, where its canonical points and whether it links back to the checked page.
How to read the result
The summary at the top lists the problems found. The table shows one row per annotation; an address that appears twice (for example en and x-default to the same page) is opened only once.
| What it shows | |
|---|---|
| hreflang | The code as written on the page; an invalid code is marked. |
| Address | The alternate page, or “this page” for the self-reference. |
| Source | HTML or HTTP header. |
| Answer | 200, a redirect with its target, an error, noindex or a canonical to another address. |
| Return link | Whether the alternate page links back to the checked page with its own hreflang set. |
What the checker does not test
- hreflang in the XML sitemap (
xhtml:link) – the full audit reads the sitemap as well. - Annotations added only by JavaScript: the page is read as HTML, without running scripts.
- Whether the text of each version is really in the declared language.
- The whole site: one check covers one page and up to 10 alternates on up to 5 sites. The full audit compares all crawled pages.
How to fix the most common hreflang errors
Illustrative example for a site in English and Bulgarian. Both versions carry the same three lines: <link rel="alternate" hreflang="en" href="https://example.com/">, <link rel="alternate" hreflang="bg" href="https://example.com/bg/"> and <link rel="alternate" hreflang="x-default" href="https://example.com/">.
- No return link: put the same complete set of annotations on every version, so that each page lists itself and all the others.
- Alternate that redirects or returns an error: point
hreflangto the final address that answers 200. - Invalid code: write
en-GBinstead ofen-UKand use a hyphen instead of an underscore (bg-BG, notbg_BG). - Relative address: write the full URL with
https://and the host. - Canonical to another language: give every language version a canonical to itself.
Sources
- Google Search Central: Tell Google about localized versions of your page
hreflang generator
Enter one language code and URL per line. You get the link tags for every version and the sitemap entries; the same set goes on every page in the group.
Link tags and sitemap
Frequently asked questions
- What is hreflang?
- An annotation that tells search engines which language or regional versions of a page exist, so that they can show visitors the version in their language. It does not raise rankings by itself; it helps the right version appear.
- Is hreflang required?
- No. It is useful for sites with the same content in several languages or for several regions. A site in a single language does not need it.
- Where should hreflang be placed?
- In the HTML head, in the HTTP
Linkheader (useful for PDF files) or in the XML sitemap. One method is enough; if you use several, the annotations must match. - Why does Google ignore my hreflang?
- The most common reasons are missing return links, alternates that redirect, have
noindexor a canonical to another address, invalid codes and relative addresses – exactly what this check shows. - Is x-default required?
- No, it is recommended. It tells search engines which page to show visitors whose language does not match any listed version – often the home page or a language selector.
- Does the tool follow robots.txt?
- Yes. Our bot identifies itself as RankDossierBot, follows the
robots.txtof every site and opens at most 10 alternate pages per check. - How is it different from the full audit?
- The tool checks one page. The full audit checks hreflang on all crawled pages, including the XML sitemap, together with more than 320 other checks.
Related guides
- Common indexing and canonical tag mistakes on multilingual sites
- How to run a technical SEO audit and prioritize the fixes
- What is an SEO audit? Its scope and how to use the results
- How to read an SEO audit report and decide what to fix first
Read how to fix it in the guide “International SEO” and on the check page “hreflang errors”.
More free tools
- All free tools
- robots.txt tester
- Sitemap validator
- Indexability checker
- Redirect checker
- Broken link checker
- Title and description
- Heading checker
- Structured data test
- Open Graph checker
- SEO content checker
- Website speed test
- Mobile friendly test
- AI bots in robots.txt
- llms.txt checker
- AI visibility checker
- Keyword rank checker
- Backlink checker
Want to check the whole site?
The free tool tests one group of pages. The full audit reads the language tags of the whole site, finds missing return links, wrong language codes and pages that point to redirects or errors, and lists every broken pair with the exact fix.
Start the free pre-check