x-default is a reserved value of the hreflang attribute. It marks the version of a page meant for users whose language or region matches none of the other listed variants. Often that is a language selector page or the default language.
How does x-default work?
Google describes it as the value used “when no other language/region matches the user’s browser setting” and gives a country or language selector page as a typical use. It is set like any other hreflang entry, in the HTML head, an HTTP header or an XML sitemap, and it needs no language or region code.
The usual rule applies: pages must reference each other. If a page points to the x-default version, that version must point back, otherwise Google ignores the tags.
One URL can carry x-default in addition to a language code, for example an English page marked as both en and x-default. Google’s John Mueller confirmed this at SMX Munich in 2016 and again on Twitter in 2017, as a post by searchVIU (2018) records. Google’s documentation doesn’t spell this case out.
Example
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
Here the home page example.com offers the language choice, and visitors with other languages land there.
FAQ
Is x-default required? No, it is an optional addition. It helps when visitors with languages you do not cover should reach a sensible page.
More on the searchVIU blog
Sources
- Tell Google about localized versions of your page – Google Search Centraldevelopers.google.com
- x-default hreflang for international pages – Google Search Central Blog (2013)developers.google.com
- Why hreflang x-default matters – AdLift (secondary)adlift.com
- Can multiple hreflang tags point to one URL? John Mueller of Google says YES. – searchVIU blog (2018)searchviu.com
Last updated: