hreflang x-default: when and how to use it

·4 min read

hreflang x-default tells Google which URL to show searchers whose language or region matches none of the versions you list. Point it at a language selector if you have one, otherwise at the version you would show an unknown visitor, usually your English or main-market page. Use the same x-default URL on every page in the set, and make sure that URL returns 200 without redirecting.

It is optional. Google's localized versions guide recommends it as the fallback for users whose language settings don't match, and says it was designed for language selector pages. If you are still setting up hreflang itself, start with how hreflang works and come back.

What hreflang x-default means

x-default is a reserved hreflang value that matches every language and region you did not name. It takes no language code. A searcher in Poland with a Polish browser, on a site that only has English, German and French versions, falls through to the x-default URL.

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

Without it, Google still picks something for the Polish searcher. It just picks on its own, and you lose the one line that tells it your preference.

Language selector or default locale page?

Use a language selector as x-default when one exists as its own crawlable URL. Use your default locale page when it does not.

Your setup Point x-default at
Root URL shows a "choose your country" page The selector, e.g. https://example.com/
No selector, English is your widest audience The English page, e.g. https://example.com/en/
One market dominates, e.g. a German shop with an English side site The German page
Root redirects visitors by IP or browser language The default locale page, not the redirecting root

A selector suits sites whose markets are roughly equal, such as a travel brand with ten country stores. A searcher in an unlisted country lands on a page that lets them choose, which beats dropping them into the wrong currency.

Most sites don't have a real selector, and that's fine. Pointing x-default at /en/ while /en/ also carries hreflang="en" is allowed. Two values sharing one URL is normal here. What Google cannot accept is one value pointing at two URLs.

Examples of x-default done right

On a page-level cluster, x-default follows the page, not the home page. For a pricing page with three versions, every one of the three carries this exact block:

<link rel="alternate" hreflang="en-us" href="https://example.com/pricing/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/pricing/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/preise/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing/" />

The x-default for the pricing cluster is a pricing page. Sending it to the home page makes the home page an alternate of pricing, and since the home page never lists the pricing pages back, Google drops that pair.

For sites that serve hreflang in HTTP headers, such as PDFs, the same rule applies through the Link header:

Link: <https://example.com/guide.pdf>; rel="alternate"; hreflang="en",
      <https://example.com/de/guide.pdf>; rel="alternate"; hreflang="de",
      <https://example.com/guide.pdf>; rel="alternate"; hreflang="x-default"

Common x-default mistakes

Most broken x-default setups come down to one of these three.

Each page points x-default at itself. A template outputs hreflang="x-default" with the current URL, so /de/ says x-default is /de/ and /fr/ says it is /fr/. The cluster now names three different fallbacks and Google can't use any of them. Hardcode one x-default URL per cluster in the template.

x-default is missing from part of the cluster. It appears on the English page because someone added it by hand, but the German and French versions never got it. Every version must list the full set, itself and x-default included. Google's guide is blunt about it. If two pages don't both point to each other, it ignores the tags.

x-default points to a redirect. The usual culprit is a root URL that sends visitors to /en-us/ or /de/ based on IP or Accept-Language. Google's locale-adaptive pages guide says Googlebot mostly crawls from US IP addresses and without an Accept-Language header, so it sees one redirect target and never the fallback you meant. Either make the root a real selector that returns 200, or point x-default at the final URL. The same goes for small redirects such as a missing trailing slash or http to https. Use the URL the server lands on. Our post on redirect chains shows how to trace them.

Two smaller ones. The x-default URL must be fully qualified with https://, and it must not be noindex or canonicalized to another page, because Google only uses hreflang from indexable, canonical URLs.

Check your x-default with the hreflang checker

The hreflang checker reads the hreflang annotations in a page's HTML head and its Link header. It flags a missing x-default, invalid codes, one code pointing at several URLs, relative URLs and a page that doesn't list itself. Then it fetches up to 20 alternates, the x-default URL among them, and reports any that fail to load, redirect, are noindex, are canonicalized elsewhere or don't link back. Each run costs 10 credits.

It checks one page's cluster per run. It doesn't read hreflang in XML sitemaps or crawl the whole site, and it confirms return links rather than comparing x-default values across versions. To catch the "points at itself" mistake, run it on two language versions and compare the x-default URLs in each result. For a broader walk-through of the report, see how to test hreflang.

Keep reading