Scoreling

codes · return links · x-default · free

Hreflang checker

Enter a page and see its hreflang tags: every language and country code, x-default, and whether each alternate answers and links back, the way Google needs both pages to confirm a pair.

What is hreflang?

An attribute that tells search engines which language and country a page is for, and where its other language versions are, so a searcher in Austria gets the de-AT page rather than the one for Germany. Every version lists itself and all the others:

<link rel="alternate" hreflang="en" href="https://example.com/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
<link rel="alternate" hreflang="de-AT" href="https://example.com/at/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

The same four lines go on all three pages.

What the checker looks at

  • Every annotation. The link tags in the page head and the HTTP Link header, which is how PDFs and other files declare theirs.
  • Language and country codes. An ISO 639-1 language, then optionally an ISO 3166-1 country: en-GB, not en-UK, en_US or jp.
  • The page itself. Whether it lists its own URL, which Google requires, and whether one code points at two pages.
  • Return links. The first 20 alternates are fetched: each must answer 200 at that address and list this page back.
  • Canonicals. A version whose canonical names another URL drops out of the cluster.
  • x-default. Whether the cluster has one, and only one.

Hreflang can also live in the XML sitemap as xhtml:link entries. The checker does not read those; the sitemap checker tests that the sitemap itself works.

Hreflang x-default

x-default names the page for everyone else: searchers whose language or country none of your versions targets. Point it at a language picker or your main version, and set the same one on every page of the cluster.

Questions about hreflang

What is hreflang?

An attribute that tells search engines which language and country a page is for, and where its other language versions are. Google uses it to show a searcher in Germany the German page and one in Austria the de-AT page, instead of whichever version ranks best.

What does "no return tags" mean in Search Console?

Page A lists page B as its alternate, but page B does not list page A back. Google only trusts hreflang that both pages confirm, so it ignores the pair. Add the same full set of annotations, the page itself included, to every version.

Do I need x-default?

It is optional but recommended: it names the page for searchers whose language you have no version for, usually a language picker or the English page. Set it once per cluster, the same URL on every version.

Is it en-UK or en-GB?

en-GB. The region is an ISO 3166-1 country code, and the United Kingdom's is GB. Google ignores en-UK, along with underscores (en_US), country codes used as languages (jp instead of ja) and regions such as EU.

Can hreflang go in the sitemap instead?

Yes. Google reads hreflang in three places: link tags in the page head, an HTTP Link header (for PDFs and other files), and xhtml:link entries in the XML sitemap. Use one method per page. This checker reads the first two.

Should hreflang URLs be canonical?

Yes. Every URL in a cluster should answer 200, not redirect, and have a canonical pointing at itself. If a version's canonical points to another language, Google drops it from the cluster.