Skip to content

hreflang list has no x-default

hreflang-x-default-missingminor
On this page

Why it matters

  • x-default tells Google which version to show a visitor whose language or country none of the listed versions fits: a visitor from Egypt, to a store that lists ar-SA and ar-AE only.
  • Google calls it recommended, not required, so this is minor: without it Google picks a version itself.
  • It is usually the language-selector page or the version meant for everyone else.

Example

Wrong
<link rel="alternate" hreflang="ar-SA" href="https://shop.example/sa/offers" />
<link rel="alternate" hreflang="ar-AE" href="https://shop.example/ae/offers" />
<link rel="alternate" hreflang="en" href="https://shop.example/en/offers" />
</head>
Right
<link rel="alternate" hreflang="en" href="https://shop.example/en/offers" />
<link rel="alternate" hreflang="x-default" href="https://shop.example/offers" />
</head>

How to fix

Add one x-default link to the same list on every version, to the page meant for everyone else:

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

If your store has one version for the whole world (an Arabic store with a single page), you need none of this: hreflang is for pages with more than one version.

How we detect

  1. We read the page's <link rel="alternate" hreflang> elements and its Link headers.
  2. When they list two or more different codes (not counting x-default) and none of them is x-default, in any letter case, the page lacks one.