hreflang="x-default" — Correct Usage
Copy-paste correct usage for Default / language-selector page — HTML, sitemap syntax and the mistakes to avoid.
x-default is the fallback entry in an hreflang cluster: it points search engines to the URL to show when no listed language matches the searcher. Use exactly one per cluster, usually your default-language page.
HTML head implementation
<link rel="alternate" hreflang="x-default" href="https://example.com//" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />
XML sitemap implementation
<url> <loc>https://example.com/</loc> <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" /> <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" /> </url>
Rules that trip people up
- Reciprocity: every alternate must link back to every other one, including itself.
- Valid syntax: ISO 639-1 language, optionally “-” + ISO 3166-1 country (or UN M49 region like 419).
- Point only at canonical, indexable, 200-status URLs — never at redirects.
- hreflang suggests, canonical decides: conflicting canonicals silently break clusters.
Frequently asked questions
What does hreflang="x-default" mean?
x-default marks the URL search engines should serve when no other hreflang entry matches the user's language — typically your primary-language homepage or a language selector. It is required best practice in every hreflang cluster.
Where do I put hreflang="x-default"?
In one of three places (pick one, consistently): link tags in the HTML head, HTTP headers, or your XML sitemap. Every language version must list all alternates including itself — missing return links invalidate the cluster.
What are the most common hreflang mistakes?
Non-reciprocal links (A lists B, B forgets A), invalid codes (using country codes alone, or “en-EU”), pointing alternates at redirected/noindexed URLs, and forgetting the self-reference. Audit clusters with a crawler after any URL change.
Keep exploring
Never hand-write hreflang again
Transxlate generates correct clusters for every language version automatically.