What is x-default?

x-default is a special value for the hreflang attribute. Where other values name a language or a language and region, such as de or en-GB, this one names no audience at all. It tells search engines which URL to offer when none of your listed versions fits the searcher.

It is optional, and Google recommends it for sites with a language or country selector page.

The markup

On a site with three versions and a selector at the root, every one of the four pages carries the same set of tags:

html
<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/" />

The same annotation can be given in an XML sitemap or, for non-HTML files, in an HTTP Link header:

xml
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" />

What the fallback page can be

There are two common patterns, and both are valid.

A selector or auto-redirecting homepage. The root URL shows a list of countries or languages, or redirects visitors by browser language. It belongs to no single audience, so it is marked x-default and nothing else.

One of the real versions. Many sites have no selector. They nominate the version most visitors can use, usually English, as the fallback. That URL then appears twice in the set, once under its language and once as the default:

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

Listing the same URL under two values is allowed. What is not allowed is two different x-default URLs in one set.

Rules that are easy to break

  • One per set of alternates. Each group of equivalent pages has at most one default. Different page groups have their own: the pricing pages point to the default pricing page, not to the homepage.
  • It must be reciprocal like the rest. Every page in the set lists every other member and itself, including the x-default line. If the default page does not carry the annotations back, the set can be ignored.
  • The URL must be indexable. It should return 200, not be blocked in robots.txt, not carry noindex, and be its own canonical.
  • Use absolute URLs, with protocol and hostname.
  • Spell it exactly. x-default in lowercase with a hyphen. Values such as default, xx or en-x-default are not recognised.
  • It is not a region. It cannot be combined with a language, and it does not mean "international English". For English speakers outside your targeted countries, a plain en tag does that job.

x-default and automatic redirects

Sites that redirect visitors by IP address or browser language need particular care, because Googlebot crawls mostly from one country and sends no language preference. If / always redirects it to /en/, Google may never see the other versions through that route.

The usual arrangement is:

  1. Keep every language version reachable at its own URL without forced redirection.
  2. Let the root either show a selector or redirect with a temporary 302.
  3. Mark the root as x-default.
  4. Give visitors a visible way to switch version, and remember their choice.

With that in place the redirecting URL is understood as the entry point for everyone else, and the language URLs are indexed in their own right.

What x-default does not do

It does not affect rankings, merge the versions' signals, or work as a canonical. Hreflang annotations help a search engine swap in the most suitable URL for a searcher once one of the group already ranks. The default line only extends that swap to unmatched users. Without it, Google chooses a version for them by its own judgment, which is often fine.

It also does not fix duplicate content between, say, US and UK English pages. Those remain separate indexable pages, and the hreflang set is what tells search engines they are intended alternates.

Setting it up in WordPress

WordPress core prints no hreflang tags. On multilingual sites the translation plugin outputs them, and most let you choose which language serves as x-default. On a multisite network with one site per country, the tags are often added by custom code in the theme.

Whichever generates them, check the result. Our hreflang tag generator builds a complete set including the default line and flags common mistakes, and the steps for a full setup are in set up hreflang in WordPress. Then view the source of each language version and confirm that all of them print an identical list, that the default URL opens without a redirect chain, and that an SEO plugin's canonical tag on each version points to that version itself, not to the default.

Common questions

Is x-default required for hreflang?

No. Hreflang works without it. It is recommended when you have a language selector or a homepage that redirects by location, and it is a sensible addition whenever one version should serve everyone else.

Can x-default point to the same URL as another hreflang value?

Yes. A common setup lists the English page under both en and x-default. What you cannot have is more than one x-default URL for the same set of pages.

Does x-default affect rankings?

No. It only tells search engines which version to show users who match none of the listed languages or regions. It carries no ranking weight.