Skip to content
AgileLogics

Hreflang Checker

Fetches a page from our server and lists every <link rel="alternate" hreflang="..."> tag it declares.

How it works

Enter a URL and click Check.

What does an hreflang checker show?

An hreflang checker reads the <link rel="alternate" hreflang="..."> tags a page declares and lists each language or region code with the URL it points to. Those tags tell Google which version of a page to show to searchers in each language or country. This tool fetches the page from our server and prints every pair it finds.

Hreflang errors are silent. Nothing breaks visibly, and you only notice weeks later when German searchers land on your US pricing page. Listing the tags is the quickest way to see what you actually shipped.

Checking a page

Enter the full URL of one language version and click Check. Our server requests the page, follows up to ten redirects, and parses the HTML. The output for a page with four alternates looks like this:

en-us: https://www.example.com/shoes/trail
en-gb: https://www.example.com/uk/shoes/trail
de: https://www.example.com/de/schuhe/trail
x-default: https://www.example.com/shoes/trail

Each line is the hreflang attribute, a colon, then the href exactly as written. Nothing is normalised, so a lowercase en-gb stays lowercase and a relative path stays relative. When the page has no matching tags, you get "No hreflang tags found on that page."

The rules Google applies

These come from Google's guide to localized versions of your pages. Check the output against each one:

  1. The page lists itself. Every language version must include its own URL in the set. In the example above, the US page's own URL appears on the en-us line, as it should.
  2. Every version lists every other. The set should be identical on all pages in the group.
  3. Links go both ways. Google says that if two pages don't both point to each other, the tags are ignored. This is the most common reason hreflang "doesn't work".
  4. Codes follow the standards. The language part is an ISO 639-1 code, optionally followed by a region from ISO 3166-1 alpha-2.
  5. URLs are fully qualified, including https://.
  6. x-default is the fallback for users whose browser language matches none of your versions.

Google also states it doesn't use hreflang or the HTML lang attribute to detect a page's language. Hreflang only chooses between versions you've already made.

Code mistakes to look for

Written Problem Use instead
en-uk UK isn't the ISO code for the United Kingdom; Google lists it among codes that have no effect en-gb
en-eu EU isn't a country; Google says it has no effect One tag per country, or plain en
gb Region with no language; the language part is required en-gb
jp jp is the country; Japanese is ja ja or ja-jp
/de/schuhe as href Relative URL https://www.example.com/de/schuhe

The jp/ja and cz/cs mix-ups (country code used where the language code belongs) are easy to miss because both look plausible.

Testing a full hreflang set

Run the checker on one page, then on each URL it returns. For a three-language set that's three runs, and every run should print the same lines in some order. If the German page lists only itself and English, your French page has lost its return link from German. The open all URLs tool is handy for opening every alternate in tabs to eyeball them.

While you're there, compare against the canonical URL checker for the same pages. Hreflang says "this German page is the version for German speakers", while a canonical pointing at the English page says "treat this as a duplicate of English". Those two statements contradict each other, so make sure each version's canonical names its own URL.

What this tool doesn't see

  • HTTP header and sitemap hreflang. Google treats all three methods as equivalent. If you declare alternates in Link: headers or in your XML sitemap, this tool reports nothing; use the sitemap validator to at least confirm the sitemap parses.
  • Script-added tags. A <link> counts when its rel contains alternate in any capitalisation and it has an hreflang attribute. Tags added by JavaScript after load aren't in the HTML our server reads.
  • Reachability. It doesn't request the alternate URLs, so a 404 or redirected alternate won't be flagged. Put each one through the redirect checker; alternates should answer 200 directly.

Only public addresses can be checked: the hostname is resolved first, and private or reserved IP ranges are refused. The wait is capped at eight seconds per response.

Last updated

Frequently asked questions

Does the checker validate my hreflang codes?
No. It lists each hreflang value and URL exactly as written in the HTML. Comparing them against ISO 639-1 language codes and ISO 3166-1 alpha-2 region codes is up to you; the table on this page lists the mistakes that come up most.
Does it check return links on the other language versions?
Not automatically. It reads one page per run. To confirm return links, run each alternate URL from the output through the checker and make sure every page lists the same full set.
My hreflang is in the sitemap. Why does the checker find nothing?
The checker only reads link elements in the page's HTML. Google also accepts hreflang in HTTP headers and in XML sitemaps, and those methods are equally valid, but this tool can't see them.
Is x-default required?
No, but it's recommended. Google uses x-default for visitors whose language or region doesn't match any of your listed versions, typically pointing it at a language selector or your main international page.