/ ← Hreflang Fixes / x-default
In this guide
  1. What x-default does, and what it does not
  2. Choosing the fallback: three patterns
  3. What a correct x-default looks like
  4. Errors that come with adding x-default
  5. Adding x-default on common platforms
  6. The fix, step by step
  7. Keeping the fallback consistent
  8. Questions and answers

What x-default does, and what it does not

Hreflang values normally name a language, or a language and a country. x-default is the one value that names neither. It marks the address to use when none of the other entries in the cluster fits the searcher. Google introduced it for language selection pages and home pages that choose a version for the visitor, and it is widely used for international versions of a site as well.

A few points are often misunderstood:

Choosing the fallback: three patterns

The right fallback depends on who reaches you from outside your target markets and what they can do when they arrive.

Patternx-default points toSuitsWatch out for
Language or country pickerA page that lists every version and lets the visitor chooseSites with several languages of similar weight, or country stores with different ranges and pricesThe picker must have real, indexable content and plain links, not only a script-driven menu
International versionA general version in the most widely read language, often English without a regionSites with regional English pages plus a sensible version for the rest of the worldPrices and delivery on that page should make sense for international visitors
Main market doubles as fallbackThe same address as one of the language entriesSites with one dominant market and a few translationsThat page appears twice in the block, once with its code and once as x-default, which is correct

For most small and medium sites, the third pattern is the simplest: the English page is already the one you would want an unmatched visitor to see. A picker only earns its place when no single version is a good default, for example a shop whose products, prices and shipping differ completely by country.

What not to use as a fallback

What a correct x-default looks like

Here is a delivery information page with a British page, an Irish page, a German page and an international English page as the fallback. The same five lines go in the head of all four pages:

<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/delivery/">
<link rel="alternate" hreflang="en-IE" href="https://example.com/ie/delivery/">
<link rel="alternate" hreflang="de" href="https://example.com/de/lieferung/">
<link rel="alternate" hreflang="en" href="https://example.com/delivery/">
<link rel="alternate" hreflang="x-default" href="https://example.com/delivery/">

Notice that the international page is listed twice: once as en, catching English speakers outside the UK and Ireland, and once as x-default, catching everyone who matches nothing, such as a Spanish speaker in Mexico. Those are different groups, so both lines are useful.

In an XML sitemap the same fallback appears as one more alternate under each address:

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

And for files without an HTML head, such as a PDF brochure, it goes in the HTTP Link header alongside the others:

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

Errors that come with adding x-default

Adding x-default in a hurry introduces its own problems. The checker reports several of these alongside or instead of "missing x-default":

ErrorWhy it happensCorrection
x-default only on the home pageAdded by hand to one templateAdd it in the shared head code so every clustered page gets its own
Two x-default lines with different addressesA plugin adds one and the theme adds anotherKeep one source of hreflang output
x-default names the home page from a product pageA single site-wide settingPoint to the fallback version of the same product
x-default page redirectsThe address is a location-based redirectPoint to a page that returns 200, or make the chooser a real page
x-default page is noindexedPickers are sometimes treated as utility pagesAllow indexing, and give the picker useful text
Invalid valueTyped as x_default, xdefault or defaultUse exactly x-default
⚠️ If your site root, such as https://example.com/, redirects visitors to a country version based on their location, be careful using it as x-default. Google mostly crawls from the United States, so it may only ever see one destination. A static chooser page, or an international version that does not redirect, is far easier for Google to understand and for the checker to verify.

Adding x-default on common platforms

WordPress

Multilingual plugins such as WPML and Polylang can output x-default automatically, usually pointing to the default language. Check the plugin's settings for the x-default option and which language it uses, and make sure no SEO plugin or theme adds a second one. The WordPress hreflang guide covers plugin combinations.

Shopify

Shopify generates hreflang for markets and languages itself. Check the rendered source of a few pages to see whether an x-default line is present and which address it uses, and look at apps or theme code if there is more than one. The Shopify hreflang guide has the details.

Next.js and Nuxt

In the Next.js App Router, add an x-default key to the alternates.languages object alongside the locale keys. In Nuxt, the i18n module's head helper can output a fallback line based on the default locale; check the generated head to confirm. See hreflang in Next.js and Nuxt.

Static sites and custom templates

Wherever the template loops over locales to print hreflang lines, add one more line after the loop, built from the same page's default-locale address:

{% for alt in page.all_versions %}
<link rel="alternate" hreflang="{{ alt.code }}" href="{{ alt.url }}">
{% endfor %}
<link rel="alternate" hreflang="x-default" href="{{ page.version('en').url }}">

If a page has no version in the default locale, choose deliberately: either leave x-default out for that cluster, or point it at the version you would most want unmatched visitors to read. Do not fall back to the home page.

The fix, step by step

Step 1

Decide what unmatched visitors should see

Look at who reaches you from outside your target languages and countries, using your analytics country and language reports. Then choose a pattern: a language or country picker, an international version, or letting your main market page double as the fallback. For most sites with one dominant language the last is simplest. Choose a picker only when no single version would serve an outsider reasonably, for example when products or shipping differ completely by country.

Step 2

Choose the fallback address for each cluster

Apply the pattern page by page, so each cluster falls back to its own equivalent: the international pricing page for the pricing cluster, the international version of a product for that product. Only the home page cluster should fall back to the home page or the site-wide picker. Where a page exists in some locales but not the default one, decide whether it needs an x-default at all rather than pointing it somewhere unrelated.

Step 3

Add the x-default line to every member

Add the line in the code or plugin setting that already prints the hreflang block, so it appears on every page in each cluster with exactly the same address. Use the value x-default with no variations. If you declare hreflang in a sitemap, add an xhtml:link for the fallback under every entry instead. Make sure only one tool outputs hreflang, so the page does not end up with two conflicting fallbacks.

Step 4

Make sure the fallback page is usable

Open each fallback address and confirm it returns 200 without redirecting, is not noindexed or blocked, and has a canonical pointing to itself. A picker page should contain real text and ordinary links to each version, not just a script-driven menu or an automatic redirect. An international page should show prices, delivery options and contact details that make sense to visitors from anywhere.

Step 5

Recheck clusters and keep one fallback each

Run the Hreflang Checker again on a page from each locale and each page type. The missing x-default warnings should be gone, and no cluster should contain two different x-default addresses. Check that adding the fallback has not created new return tag or target errors, which happens if the fallback page does not carry the block itself. Add x-default to your checklist for new page types and new markets.

Keeping the fallback consistent

Questions and answers

1. Is x-default required for hreflang to work?

No. A hreflang cluster without x-default is still valid, and Google will use the language and region entries you have. What x-default adds is control over searchers who match none of your entries, such as someone searching in a language you have not translated into. Without it, Google chooses whichever version it judges best for them. Adding it is quick, which is why audit tools recommend it, but a missing x-default is less urgent than broken return tags or canonical conflicts.

2. Can the x-default be the same URL as my English page?

Yes, and for many sites it is the best choice. The English page is then listed twice in the block: once with its language code, such as en, and once as x-default. Those two lines do different jobs. The en line catches English speakers you have not given a more specific page. The x-default line catches everyone else, such as speakers of languages you do not offer. Both lines must appear on every page in the cluster.

3. Should every page's x-default point to my home page?

No. x-default works per cluster, just like the other entries, so each page's fallback should be the equivalent page in your default or international version. The fallback for a product page is the international version of that product, and the fallback for the delivery page is the international delivery page. Pointing every page at the home page sends unmatched searchers to a page that does not answer what they searched for, and makes the clusters inconsistent.

4. Can I use a page that redirects by location as the x-default?

Google's original description of x-default mentioned home pages that choose a version for the visitor, so it is not forbidden. It is risky in practice, though. Google mostly crawls from the United States and may only ever see one destination, and audit tools will report the address as a redirect rather than a page. A static chooser page with plain links to each version, or an international version that does not redirect, avoids those problems.

5. What should a language selector page contain to be a good x-default?

It should be a normal, indexable page that returns a 200 status and has a canonical pointing to itself. Give it a short introduction in a widely read language, then plain links to each language or country version, labelled in that version's own language, such as Deutsch or Français. Add any useful context, such as which countries each store ships to. Avoid making the page only a pop-up, a script-driven menu or an automatic redirect.

6. Can a cluster have more than one x-default?

No. Each cluster should have exactly one x-default address, and every page in the cluster should name the same one. Two different x-default lines usually mean two tools are writing hreflang, for example a translation plugin and custom theme code, or HTML tags and a sitemap built separately. Keep one source of hreflang output and remove the other. Different clusters can, and normally should, have different x-default addresses, each pointing at its own fallback page.

7. Does x-default affect how my pages rank?

Not directly. Like the rest of hreflang, x-default helps Google choose which of your existing pages to show a particular searcher; it does not raise the ranking of any page. Its value is in making sure searchers outside your target markets land on a page that works for them, such as an international version with sensible delivery information, rather than a page written for another country. That can improve their experience and reduce visitors leaving straight away.

Check every cluster has one fallback

The Hreflang Checker follows each cluster of locale pages and validates return tags, language codes, x-default, sitemap consistency, target reachability and canonical alignment, so missing or conflicting fallbacks are reported per cluster.

Open Hreflang Fixes →
💬 Got a problem?
Related Guides: All Hreflang Fixes  ·  Fixing Invalid Language Codes  ·  Adding Missing Self-Referencing Hreflang  ·  Hreflang Guide  ·  Learning Hub

About aiwebpageseo

aiwebpageseo.com is a data-driven SEO and AEO (Answer Engine Optimisation) platform providing a free suite of technical SEO tools. Rather than relying on AI-theorised assumptions, the platform analyses live URL performance, delivering objective diagnostics, page speed metrics, CLS debugging, and site crawl data alongside actionable technical tutorials.