Skip to content
Bold PilotBold Pilot

hreflang Checker

Valid codes are the easy half. This checks that every alternate links back. Free, no sign-up.

Try , or

International SEO guide

hreflang: the return link everyone forgets, the codes that look right and are not, and what x-default is for

hreflang tells Google that several pages are the same content for different languages or countries, so it can show a Spanish reader the Spanish one instead of ranking them against each other. It is simple to write and famously easy to break, because the most common mistake is not on the page you are looking at.

What a complete set looks like

Every page in the set carries the same full list, and that list includes the page itself:

<link rel="alternate" hreflang="en"        href="https://example.com/en/pricing">
<link rel="alternate" hreflang="de-DE"     href="https://example.com/de/preise">
<link rel="alternate" hreflang="tr"        href="https://example.com/tr/fiyatlar">
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing">

All four tags go on all four pages. Miss the self-reference and Google treats the set as incomplete; miss one direction and that pair is dropped.

The return link is the whole game

hreflang is a mutual declaration. If /en/ names /de/ as its German version but /de/ does not name /en/ back, Google ignores the claim. Search Console calls this “no return tags”, and it is the single most common hreflang error in the wild.

It survives so long because it is invisible from the page you are editing. Your English page looks perfect. The mistake is on the German page, which someone else deployed, or which a template forgot when a fifth language was added. That is why the checker above fetches every alternate and reports which ones do not point back — it is the one check that requires leaving the page you typed in.

The codes that look right and are not

  • en-UK — the most common wrong code on the web. The country is GB; UK is not an ISO 3166-1 Alpha 2 code. The checker flags it and suggests the fix.
  • en_US — underscores belong to locale files, not to hreflang. It is a hyphen.
  • Region first. It is language then country: de-AT, not AT-de. Language alone is valid; country alone never is.
  • es-419 and other numeric regions — valid Unicode, but Google’s documentation asks for two-letter country codes only.
  • Invented languages. Codes that are structurally fine but mean nothing get validated here against ICU’s real language and country data.

Case does not matter to Google — en-gb and en-GB are the same — but the conventional form is lowercase language, uppercase country, and it makes mistakes easier to see.

What x-default is for

x-default names the page for everyone the set does not cover: a visitor in a country you do not target, or with a browser language you do not publish. It is usually the global English page or a language selector. It is optional, and without it Google picks something for you — often the version it happened to crawl first.

Three ways to declare it, and when to use which

  1. HTML link tags, in the <head>. Right for most sites. Costs a few hundred bytes per page.
  2. The HTTP Link header. The only option for non-HTML files — a PDF price list in three languages, for instance. The checker reads these too, which most free tools do not.
  3. The XML sitemap. Best for large sets: annotating fifty languages in HTML means fifty tags on every page, while the sitemap holds it in one place. The rule is the same — every URL lists every alternate, including itself.

Pick one and use it consistently. Mixing methods for the same pages is how sets drift apart.

hreflang and canonical, together

These two contradict each other when misused, and it is the second-most common failure. Each language version must be self-canonical: the German page’s canonical points at the German page. If the German page canonicalises to the English one, you have told Google the German page should not exist — and then asked it to show that page to German readers. The canonical wins, and the annotation is discarded. The checker flags an alternate that canonicalises elsewhere for this reason. The meta tag checker shows the canonical for any single page.

When you do not need hreflang

A single-language site does not need it, and adding it changes nothing. It also does not help with duplicate content between unrelated pages, it is not a ranking factor in itself, and it will not make a page rank in a country it has no business ranking in. What it does is stop your own translations from competing with each other.

Frequently asked

Does hreflang work for Bing?

Bing reads it but leans more on the older content-language meta tag and on server location. Google is the one that treats hreflang as the primary signal.

How long until it takes effect?

Google has to re-crawl every page in the set before the pairing is confirmed, so weeks for a large site. Search Console’s international targeting report lags further still.

Can two hreflang tags point at the same URL?

Yes — en-GB and en-IE can both point at the same English page. What breaks is the reverse: one code pointing at two different URLs, which the checker flags.

Do I need hreflang if I use separate country domains?

Yes, and more than ever. example.de and example.fr are separate sites to Google; hreflang is what tells it they are versions of one thing.