Site SEO AI Auditpor Internet Solutions

hreflang x-default: When to Use It and How to Set It Up

4 de agosto de 20268 min de lecturaSEO internacional
hreflang x-default: When to Use It and How to Set It Up

Short answer: x-default is a special hreflang value that names the page search engines should show when none of your language or country versions matches the searcher. Point it at a language selector page or at your most general version, usually international English. Every page in the cluster should list the same x-default URL, and that URL must be indexable and return status 200.

What x-default means

A normal hreflang annotation pairs a URL with a language, and optionally a country: hreflang="de" for German, hreflang="en-gb" for English in the United Kingdom. Those annotations answer the question “who is this version for?”

x-default answers a different question: “what should everyone else see?” If your site has English, German and French versions and a searcher uses Portuguese, none of the three explicitly matches. Without x-default, the search engine picks whichever version it considers best. With x-default, you tell it your preferred fallback.

The value was introduced by Google in 2013 for language selector pages and later became the general way to mark a default version. Google describes it in its documentation on localized versions of a page. It is optional. A cluster without x-default is still valid.

When you should use x-default

x-default is worth adding in these situations:

If your site has only two language versions and no selector, x-default adds little. It is harmless, but it is not required.

What to point x-default at

There are three common patterns. Choose the one that matches how your site actually works:

  1. A language selector page. A page that lists all versions and lets the visitor choose. This is the original use case and the cleanest one, because the page is genuinely for everyone.
  2. The general version. Often the English version without a country code, for example example.com/en/. This works well when most of your unmatched visitors read English.
  3. The main-market version. Some businesses point x-default at their home market, for example the German version for a German company. This is acceptable, but only makes sense if unmatched visitors are likely to understand that language.

Whatever you choose, x-default can share a URL with another annotation. It is perfectly valid for example.com/en/ to appear twice in a cluster: once as hreflang="en" and once as hreflang="x-default".

A worked example

Consider a software company with a home page that shows a language picker, plus English, German and Spanish versions of each product page. For the pricing page, the cluster would look like this in the head of every version:

The pricing page has no picker of its own, so x-default points at the English version, the most widely understood one. For the home page cluster, x-default would point at the root URL with the picker instead. x-default is set per cluster, so different page groups can have different defaults.

Common x-default mistakes

x-default is simple, but audits regularly find the same errors:

x-default and automatic redirects

Many sites redirect visitors from the root to a language version based on the browser language or IP address. This is where x-default matters most, and where it is most often misused.

Search engine crawlers usually do not send an Accept-Language header, and Google’s crawler mostly crawls from US IP addresses. If the root always redirects a crawler to the English version, the search engine may never see the root as a page of its own. It also means that any x-default pointing at the root points at a redirect.

A safer pattern is to let the root return a real page, such as a selector or a default version, and to suggest the local version with a banner rather than forcing a redirect. Visitors can then switch languages freely, crawlers see every version, and x-default can point at a page that actually loads.

How to check your x-default

For a small site, a manual check is enough:

  1. Open the page source of one page in each language and find the x-default line.
  2. Confirm that the URL is the same on every version of that page.
  3. Open the x-default URL and check that it loads directly, with no redirect, and has no noindex tag.
  4. Repeat for a few different templates: home page, a category or product page, and a blog post.

On larger sites, template differences mean errors are often spread unevenly: the blog is fine, the shop is broken. Site SEO AI Audit crawls every page and checks hreflang in its Languages area, including x-default, return links and broken language versions. Issues are weighted by how many pages they affect, so a template-wide x-default problem shows up clearly. The first audit of a website is free; see the plans for re-audits and full page lists.

x-default with regional versions of one language

x-default becomes especially useful when you split one language into several countries. Suppose you run an online shop with separate English pages for the United States, the United Kingdom and Australia, because prices, shipping and legal terms differ. Your cluster contains en-us, en-gb and en-au, but no plain “en”.

An English speaker in Canada, Ireland, India or South Africa matches none of these exactly. Search engines will try to pick the closest version, but you have more information than they do. You know, for example, that your US store ships worldwide while the UK and Australian stores do not. In that case the US version is the right fallback, and x-default should say so.

There are two clean ways to handle this:

Both approaches can be combined. A page can be listed as en-us, en and x-default at the same time. What matters is that the choice reflects reality: the fallback page should be one that visitors from unlisted countries can actually buy from or use.

The same thinking applies to Spanish (Spain versus Latin American countries), Portuguese (Portugal versus Brazil), French (France, Belgium, Switzerland, Canada) and German (Germany, Austria, Switzerland). Wherever one language is split by country, decide explicitly who gets the leftover traffic.

Related reading

The bottom line

x-default is the fallback in an hreflang cluster: the page to show when no language or country version fits. Use it when you have a language selector, a root URL that adapts to visitors, or only some markets covered. Point it at a real, indexable page, keep it identical on every version in the cluster, and never point it at a redirect.

FAQ

Is x-default required for hreflang to work?

No. x-default is optional, and hreflang clusters without it are valid. It becomes useful when you have a selector page or when many searchers match none of your versions.

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

Yes. It is common for the English version to be listed both as hreflang=”en” and as hreflang=”x-default”. Search engines accept this.

Should x-default point at my home page on every page?

Usually not. x-default is set per cluster, so for a product page it should point at a version of that product page, not at the home page. Point it at the home page only in the home page’s own cluster.

Does x-default help with countries I do not target?

It helps search engines choose a sensible page for those searchers. It does not make your site rank in those countries, but it makes it more likely that the page shown is one the visitor can use.

Can x-default point at a page that redirects by language?

It should not. Alternates should return status 200 directly. If your root redirects, either point x-default at a real page or change the root so it shows content instead of redirecting.

#hreflang#International SEO#Multilingual SEO
Revisa tu propio sitio web — gratis.Todos los problemas SEO de tu sitio — y cómo corregir cada uno.
Empieza gratis
Internet Solutions

Más de nuestro equipo

Creadas por Internet Solutions. Prueba nuestros otros productos: cada uno te ahorra tiempo de una forma distinta.

internet-solutions.net ↗
Site SEO AI Audit
Resumen de privacidad

Este sitio web utiliza cookies para ofrecerte la mejor experiencia de usuario posible. La información de las cookies se guarda en tu navegador y realiza funciones como reconocerte cuando vuelves a nuestro sitio web o ayudar a nuestro equipo a comprender qué secciones del sitio te resultan más interesantes y útiles.