Free Tool

Is your hreflang set correct?

Enter a page URL. We read its hreflang tags and HTTP Link header, check every code against Google's rules and the ISO lists, and open up to 10 alternates to see if they link back. Paste HTML instead to check a draft.

Free. No sign-up. Reads link tags in the HTML head and the HTTP Link header. Hreflang in XML sitemaps is not read in this version.

An alternate points its canonical elsewhere?

The meta tag checker in the AY Rank app shows the canonical tag, robots meta tag and X-Robots-Tag of any URL, next to the title and description as Google shows them.

Open the meta tag checker

Hreflang in your sitemap?

This tool does not read sitemaps yet. The XML sitemap validator checks the file itself: format, URLs, lastmod and status codes. It lists the hreflang extension when it finds it, but does not check the values.

Open the XML sitemap validator
1

Enter a page URL

Any public page. We follow up to 5 redirects and check the set against the URL that answers.

2

We read the set

Link tags in the HTML head and the HTTP Link header, from up to 2 MB of HTML. No JavaScript is run.

3

We check every value

Codes against fixed copies of ISO 639-1, ISO 3166-1 and ISO 15924, then self-reference, x-default, duplicates and URLs.

4

We open the alternates

Up to 10, to check status codes, return links and canonical tags.

Google ignores hreflang tags when two pages don't point to each other, and ignores region codes it does not support. One wrong code or one missing link back can leave a language version out of the set, so check the tags before Google reads them.

How this works

  1. We read hreflang from two places: link rel="alternate" hreflang tags in the HTML head, and the HTTP Link header. Google treats these two and the XML sitemap as equal methods. This version does not read sitemaps. (Google, Methods for indicating your alternate pages)
  2. A value is an ISO 639-1 language code, optionally followed by an ISO 3166-1 alpha-2 region code, like de or en-GB. A region alone is not valid, because Google does not derive the language from a country. Codes outside these lists, such as es-419, are not supported. (Google, Supported language and region codes)
  3. Case does not matter: en-gb and EN-GB are the same value. Upper-case regions follow the ISO convention. You can add an ISO 15924 script between the two, like zh-Hant or zh-Hans-US. (Google, Supported language and region codes)
  4. UK, EU and UN are reserved codes, not countries, and Google says they have no effect. The United Kingdom is GB. Language codes withdrawn from ISO 639-1, like iw for Hebrew, are flagged with the current code. (Google, Common mistakes)
  5. Each version lists itself and every other version, and every URL is fully qualified with http or https. (Google, Guidelines for all methods)
  6. If two pages don't both point to each other, Google ignores the tags. We read up to 10 alternates and check that each one lists this page, matching scheme and host in any case, and flagging a link back that differs only by a trailing slash. (Google, Guidelines for all methods and Common mistakes)
  7. x-default is the fallback for users whose language you don't list. Google recommends it, mainly for language selector pages, so a missing x-default is a warning, not an error. (Google, Use the x-default value for unmatched languages)
  8. Links must sit inside a well-formed head. A tag that does not belong in the head, like img or div, closes it early, and links after it are flagged. Don't combine hreflang with media in one link tag. (Google, HTML tags)
  9. Google asks for one link per page version, so the same value on two different URLs is a warning. With hreflang, Google also asks for a canonical page in the same language, so an alternate whose canonical names another URL is an error. (Google, HTML tags; How to specify a canonical URL)
  10. Limits of this tool: we read at most 2 MB of each page and 10 alternates, with 6 seconds per request, 20 seconds per check, up to 5 redirects and 4 requests at a time. We read the HTML as the server sends it and do not run JavaScript, so tags added by scripts are not seen. The API allows 30 requests per 60 seconds per IP.
  11. We fetch only public http and https addresses on ports 80 and 443 and check every redirect hop again. The HTML reader looks at tags and attributes only and never loads anything the page points to.
  12. Paste mode runs in your browser and fetches nothing. It checks codes, self-reference, x-default, duplicates and URLs, but not return links, status codes or the canonicals of other pages.

Sources

We read each source below on 2026-11-11. Every check on this page comes from one of them. The code lists ship with the tool as fixed copies: 183 language codes, 249 region codes and 224 script codes.

Our home page passes. One of our tool pages has no set

We ran this checker on www.ayrank.com on 2026-11-11. The home page sends 8 hreflang links in its HTML head: x-default and en-US for itself, then fr-FR, de-DE, ar, es-ES, pt-PT and ja-JP. All 6 other pages answered 200, listed the home page back and named themselves as canonical, so the check found no errors and no warnings. The French page of our sitemap validator, /fr_FR/tools/sitemap-validator, has no hreflang links at all, and its canonical tag points to the English page. The checker reports that as a note, because a page without a set has nothing to pair.

Frequently Asked Questions

How do I check hreflang tags?

Enter a page URL and press Check hreflang. The tool reads the hreflang links in the page's head and its HTTP Link header, checks every code and URL against Google's rules, and opens up to 10 alternates to see whether they link back.

Is x-default required?

No. Google recommends x-default as the fallback page for users whose language you don't list, and says it was designed for language selector pages. This tool shows a missing x-default as a warning.

Why is en-UK wrong?

UK is not the ISO 3166-1 code for the United Kingdom. The code is GB, so English for the UK is en-GB. Google lists UK, EU and UN as reserved codes that have no effect in hreflang.

What is a hreflang return link?

If page A lists page B as an alternate, page B must list page A too. Google says that if two pages don't both point to each other, it ignores the tags.

Does this tool read hreflang in my XML sitemap?

Not in this version. It reads link tags in the HTML head and the HTTP Link header. Google treats all three methods as equal and says using more than one brings no benefit.

Want us to fix this for you?

This checks one page. Our International SEO work plans and checks hreflang, canonical tags and localized content across every language version of your site.