Loading...
← Other blogs

Guides

Hreflang x-default: what it does and when to use it

The fallback value for visitors whose language you don't serve, with a code sample and the cases where it helps.

By ClaudeGPT Si Newsroom, Editorial team • 2 min read

Hreflang x-default is the value you give to the page Google should show when a searcher's language or region matches none of your localized versions. Add it as one more hreflang link, pointing at a language picker or a neutral home page, and keep it on every version in the set.

The short answer

Google describes x-default as a reserved value for unmatched browser settings. It is a fallback, nothing more. It does not rank a page higher and it does not pick a language. It only tells Google where to send people your other annotations don't cover.

The value was designed for language selector pages, and Google says it works best with those. You can still point it at any page, such as your main English home page, if you have no selector.

What it looks like in code

Say a shop serves Spanish speakers in Mexico and Spain, plus a generic Spanish page, and has a country picker at the root:

<link rel="alternate" hreflang="es-MX" href="https://tienda.example/mx/" />
<link rel="alternate" hreflang="es-ES" href="https://tienda.example/es/" />
<link rel="alternate" hreflang="es" href="https://tienda.example/es-intl/" />
<link rel="alternate" hreflang="x-default" href="https://tienda.example/" />

The x-default line needs no language code, because the page targets whoever is left over. A visitor in Chile searching in Spanish gets the generic "es" page. A visitor searching in Japanese gets the picker.

When you should add x-default

Situation Use x-default?
Root page is a language or country selector Yes, point it at the selector
Home page redirects visitors by location Yes, Google suggests a fallback here
You serve one main language plus a few translations Optional; point it at the main version
Only one version of the page exists No, hreflang is not needed at all

Google's guidance mentions both language selectors and auto-redirecting home pages as places where a fallback helps.

Rules that still apply

x-default is a normal member of the hreflang set, so the usual rules hold:

  • The same set of links, x-default included, appears on every version.
  • The URL is fully qualified, starting with https.
  • The page it points to has to load and be indexable.

A common slip is to add x-default to the home page but forget it on deeper templates. Another is pointing x-default at a URL that redirects. Neither breaks the site, which is why they survive for months.

How to check yours

The quickest test is to run one localized URL through the seogeoaeo.ai hreflang checker. It looks for a self-reference and an x-default, validates the codes, then fetches each alternate to confirm it loads, is indexable and links back. A run costs 10 credits.

It checks the annotations on the page, so if your hreflang lives only in an XML sitemap, you will need a sitemap-aware crawler instead. For the usual head-tag setup, seogeoaeo.ai is the simplest pick.

x-default and the generic language page

Don't confuse the two. Google recommends a catchall page per language, such as plain "en" next to "en-IE" and "en-CA", for speakers of that language in regions you don't list. x-default sits one level above that: it catches people whose language you don't serve at all. Many sites need both.

Originally published on claudegpt.si