In short
The x-default value designates the page to show searchers whose language or country matches none of the annotated versions. Google describes it as optional but recommended, and designed it for language selection pages. The task consists of deciding whether your site needs it, choosing the right fallback page, then adding the same x-default line to every page in the group. Once it is done, an Italian searcher looking for your brand on a site translated only into French and English lands on the page you chose, and not on a version picked at random.
Why it matters
hreflang annotations tell Google which version to serve to which audience: fr-FR to French speakers in France, en-GB to English speakers in the United Kingdom. But they say nothing about everyone else. For a Japanese searcher, no version matches: Google then chooses by itself, often the version it considers strongest, which is not necessarily the most useful.
x-default fills that gap. Google introduced it in 2013 for two cases: a homepage offering a country or language selector, and a homepage that adapts its content to the visitor's apparent location or Accept-Language header. Today, its documentation recommends it more broadly to indicate a fallback page when no language matches.
x-default is not a language. Nor is it a way of designating the "main" version in a ranking sense: it passes no authority and does not replace a missing version. It is a routing rule for the audience that is not covered.
Bing has said that hreflang is a much weaker signal for it than the declared language of the content. x-default therefore matters mainly in Google.
What it improves
- Routing of the uncovered audience Searchers in languages and countries without a dedicated version land on a chosen page, often the international English version or a selector.
- Click-through rate and bounces Fewer visitors land on a regional version with a currency, lead times or terms that do not apply to them.
- Clean audits Crawling tools flag a missing
x-default, but it is not an error. A documented decision saves you from dealing with that alert at every audit. - Generative engines No documented effect. AI crawlers do not say whether they read hreflang.
- Rankings No direct effect.
How to check
1. On one page. List the annotations and spot x-default:
curl -s https://example.com/fr/tarifs/ | grep -o -i '<link[^>]*hreflang[^>]*>'
Correct result if the site needs a fallback: a single hreflang="x-default" line, with the same URL on every page in the group.
2. On every page in the group. Compare the x-default target from one version to another:
for url in https://example.com/fr/tarifs/ https://example.com/en/pricing/ https://example.com/de/preise/; do
printf "%s -> " "$url"
curl -s "$url" | grep -o -i '<link[^>]*hreflang="x-default"[^>]*>' | grep -o -i 'href="[^"]*"'
done
All three lines must show the same URL.
3. The target itself. The x-default page must return 200, be indexable and carry a canonical pointing to itself:
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/en/pricing/
4. Across the whole site. In Screaming Frog, Hreflang tab, the "Missing X-Default" filter lists pages without a fallback. The vendor itself points out that a missing one is not necessarily an error: use this list to check that the absence is intentional.
How to implement
Before you start
First decide whether you need an x-default, and pointing to what:
| Situation | Is x-default needed? | Target |
|---|---|---|
The root example.com/ shows a language or country selector |
Yes | The selection page |
| A general English version serves the rest of the world | Yes | The equivalent page in that version |
| The root adapts its content to the browser language | Yes | The root, which is not specific to one language |
| French and Belgian site, no audience targeted outside French-speaking countries | Optional | The most general version, or nothing |
| Single-language site, with no variant | No | No hreflang at all |
Rules that apply everywhere:
- One target per group. The
x-defaultline is identical on every page in the group, like the other annotations, and is part of the return links. - An equivalent page. On a product page,
x-defaultpoints to the international product page, not to the homepage (see link to the equivalent page rather than the homepage (opens in a new tab)). - A URL can carry two annotations. The same URL can be both
enandx-default. This is the most common case: Shopify, for example, pointsx-defaultto the URL of the market that contains the backup region. - A healthy target.
200response, indexable, canonical pointing to itself, no forced redirect based on IP or language (see avoid forced IP-based redirects (opens in a new tab)).
Record the decision and the target in your documentation: it serves as a reference for later audits and for define the default version (opens in a new tab).
HTML
In the <head> of every page in the group, including the target page:
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr/tarifs/">
<link rel="alternate" hreflang="de-DE" href="https://example.com/de/preise/">
<link rel="alternate" hreflang="en" href="https://example.com/en/pricing/">
<link rel="alternate" hreflang="x-default" href="https://example.com/en/pricing/">
For a selection page at the root:
<link rel="alternate" hreflang="x-default" href="https://example.com/">
The selection page contains HTML links to the homepage of each version; it does not redirect automatically.
XML sitemap
Add the x-default line to every <url> block in the group:
<url>
<loc>https://example.com/fr/tarifs/</loc>
<xhtml:link rel="alternate" hreflang="fr-FR" href="https://example.com/fr/tarifs/"/>
<xhtml:link rel="alternate" hreflang="de-DE" href="https://example.com/de/preise/"/>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/pricing/"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/en/pricing/"/>
</url>
The file must declare the xmlns:xhtml="http://www.w3.org/1999/xhtml" namespace on the <urlset> element. If the annotations are also in the HTML, the x-default target must be the same on both sides.
Apache
Versions Apache 2.4.
For non-HTML files annotated by header (see use HTTP headers for PDFs (opens in a new tab)), add x-default to the list, in the folder's .htaccess or the virtual host:
<Files "tarifs-fr.pdf">
Header set Link "<https://example.com/docs/tarifs-fr.pdf>; rel=\"alternate\"; hreflang=\"fr\", <https://example.com/docs/pricing-en.pdf>; rel=\"alternate\"; hreflang=\"en\", <https://example.com/docs/pricing-en.pdf>; rel=\"alternate\"; hreflang=\"x-default\""
</Files>
Repeat the same header on pricing-en.pdf, then reload with sudo apachectl configtest && sudo systemctl reload apache2.
Nginx
Versions Nginx 1.18 and later.
location ~ ^/docs/(tarifs-fr|pricing-en)\.pdf$ {
add_header Link '<https://example.com/docs/tarifs-fr.pdf>; rel="alternate"; hreflang="fr", <https://example.com/docs/pricing-en.pdf>; rel="alternate"; hreflang="en", <https://example.com/docs/pricing-en.pdf>; rel="alternate"; hreflang="x-default"';
}
Reload with sudo nginx -t && sudo systemctl reload nginx.
WordPress
Versions WordPress 6.4 to 7.1; WPML 4.5.0 and later, Polylang 2.1 and later (pll_rel_hreflang_attributes filter), TranslatePress 1.6.1 and later, Weglot as of November 2026.
The behavior depends on the multilingual plugin:
- WPML: since version 4.5.0, WPML automatically adds
x-defaultpointing to the default language version, with no option to turn it off. A page that does not exist in the default language does not get one. To change the target, WPML support points to thewpml_hreflangsfilter. - Polylang:
x-defaultis only produced on the homepage, when it redirects based on the browser language. To add it everywhere, Polylang's documentation shows thepll_rel_hreflang_attributesfilter:
// Place in a custom plugin or in the child theme's functions.php
add_filter('pll_rel_hreflang_attributes', function (array $hreflangs): array {
if (! isset($hreflangs['en'])) {
return $hreflangs;
}
$hreflangs['x-default'] = $hreflangs['en'];
return $hreflangs;
});
Replace en with the hreflang key of your fallback version as it appears in the source code (for example en-GB).
- TranslatePress:
Settings > TranslatePress,Advancedtab,Miscellaneoussection: enable the option that addsx-defaultand choose the fallback language. - Weglot: does not add
x-defaultautomatically. Add it through the theme or follow the Weglot documentation for your integration.
Clear the page cache, then check the source code of one page in each language.
Shopify
Versions Shopify admin, all plans, November 2026.
Automatic. When markets have separate domains, subdomains or subfolders, Shopify adds x-default pointing to the URL of the market that contains the backup region, or to the primary domain if that market has no URL of its own. To change the target, change the backup region in Settings > General, in the store defaults section: it must be a country in an active market. If you have turned off the automatic hreflang tags in Online Store > Preferences, add the x-default line in your own theme code.
Wix
Versions Wix Multilingual, all plans, November 2026.
Wix Multilingual adds hreflang and x-default tags to multilingual pages by default. The documentation does not specify the target: check the published source code; it is usually the main language version.
Webflow
Versions Webflow Localization, Localization plans, November 2026.
With Webflow Localization, the primary locale serves as the fallback. Keep every page and every CMS item published in the primary locale: the documentation states that if an item exists only in secondary locales, Webflow cannot determine a common fallback.
Drupal
Versions Drupal 10 and 11, with the Hreflang module or Metatag 2.x.
Drupal core (Content Translation module) produces the annotations for translated content, without x-default. Two contributed modules add it: the Hreflang module, which offers an x-default option (which can point to the fallback language in recent versions), and Metatag's hreflang submodule. Enable only one, to avoid duplicates.
Laravel
Versions Laravel 10 to 13: the code does not depend on the version.
In the Blade component that produces the annotations, add the fallback target from a single configuration key:
{{-- resources/views/components/hreflang.blade.php --}}
@props(['alternates'])
@foreach($alternates as $hreflang => $url)
<link rel="alternate" hreflang="{{ $hreflang }}" href="{{ $url }}">
@endforeach
@isset($alternates[config('app.hreflang_fallback')])
<link rel="alternate" hreflang="x-default" href="{{ $alternates[config('app.hreflang_fallback')] }}">
@endisset
With 'hreflang_fallback' => 'en' in config/app.php. The @isset avoids announcing a fallback to a version that does not exist for this page.
Next.js
Versions Next.js 15 and 16 (App Router).
Add the x-default key to alternates.languages:
// app/[locale]/pricing/page.tsx
import type { Metadata } from 'next';
export const metadata: Metadata = {
metadataBase: new URL('https://example.com'),
alternates: {
languages: {
'fr-FR': '/fr/tarifs',
'de-DE': '/de/preise',
en: '/en/pricing',
'x-default': '/en/pricing',
},
},
};
With generateMetadata, build the same object from the translations actually available for the page.
Common mistakes
- Pointing
x-defaultto the homepage from every page: the fallback for a product page must be a product page. - Different targets on different pages of the group: the French version announces one target, the German version another.
- A target that redirects based on IP or browser language: Googlebot, which crawls mostly from the United States, sees only one version.
- Using
x-defaultin place of a language: an English version must also carry itsenannotation, otherwise English speakers are covered only by the fallback. - Believing that
x-defaultdesignates the canonical version: it consolidates nothing and does not replace each version's canonical. - Pointing to a non-indexable page (noindex, blocked, on staging).
- Duplicated annotations: a multilingual plugin plus a theme, or two Drupal modules, each producing its own
x-default.
Frequently asked questions
Is x-default mandatory in hreflang?
No, x-default is optional. Google recommends it to indicate a fallback page for searchers whose language or country matches none of the annotated versions, and designed it for language selection pages. Without it, Google chooses by itself which version to show that audience. Add it as soon as you have a selection page or a credible international version for the rest of the world.
Which page should x-default point to?
Point x-default to the page that best serves a searcher whose language is not covered: a language selection page at the root, or the equivalent page in your international version, often in English. On a product page or an article, the target must be the equivalent product page or article, not the homepage. The target must return 200, be indexable and have a canonical pointing to itself.
Can the same URL have both hreflang en and x-default?
Yes. An international English page can carry both the en annotation, for English speakers, and the x-default annotation, for every audience that is not covered. This is the most common configuration, and Shopify applies it automatically by pointing x-default to the URL of the backup market. Simply keep both lines on every page in the group, with the same URL.
Does x-default improve the main version's rankings?
No. x-default is a routing rule: it indicates which page to show the uncovered audience, without passing authority or consolidating signals. It does not replace each version's canonical and does not push the target page up in the results. Its benefit shows in the click-through rate and in how relevant the landing page is for searchers in countries and languages without a dedicated version.
Resources
- Google Search Central: Localized versions of your pagedevelopers.google.com
- Google Search Central Blog: x-default hreflang for international pages (2013)developers.google.com
- Shopify: International SEO for marketshelp.shopify.com
- Polylang: hreflang attributes and x-defaultpolylang.pro
- Wix: SEO for multilingual sitessupport.wix.com
- Webflow: Localized SEO and locale routinghelp.webflow.com
- Drupal: Hreflang moduledrupal.org
- Next.js: alternates metadatanextjs.org
Updated on
Topic checklist (PDF)