RankDossier
Free tool

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.

Free · no registration · one page and up to 10 of its language versions per check · Updated:

What the hreflang checker tests

  • Every hreflang annotation of the page: <link rel="alternate" hreflang="…"> in the HTML head and rel="alternate" entries in the HTTP Link header, 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), or x-default. Common mistakes such as en-UK and bg_BG are 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
hreflangThe code as written on the page; an invalid code is marked.
AddressThe alternate page, or “this page” for the self-reference.
SourceHTML or HTTP header.
Answer200, a redirect with its target, an error, noindex or a canonical to another address.
Return linkWhether 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/">.

  1. No return link: put the same complete set of annotations on every version, so that each page lists itself and all the others.
  2. Alternate that redirects or returns an error: point hreflang to the final address that answers 200.
  3. Invalid code: write en-GB instead of en-UK and use a hyphen instead of an underscore (bg-BG, not bg_BG).
  4. Relative address: write the full URL with https:// and the host.
  5. Canonical to another language: give every language version a canonical to itself.

Sources

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 Link header (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 noindex or 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.txt of 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.

Read how to fix it in the guide “International SEO” and on the check page “hreflang errors”.

More free tools

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