x-Default Hreflang Tag for International Site Root/Homepage
Issue No: 135
Category: International SEO
Issue type: Issue
Priority: IMPORTANT
Description
Pages serving an international audience should include an hreflang="x-default" tag that tells Google which page to display when no language-specific match is found for the user's browser language or region.
How do we capture it
When the XeoPix crawler downloads the HTML response, the parser scans the <head> section for all link[rel="alternate"][hreflang] elements and checks whether any of them carry an hreflang value of exactly x-default.
- Issues an HTTP GET to the target URL.
- Reads raw response bytes (no JavaScript rendering).
- Parses the
<head>block for all<link rel="alternate" hreflang="...">tags. - Searches the collected hreflang values for the literal string
x-default. - Records the
hrefURL associated with thex-defaulttag. - Also inspects the HTTP
Link:response header forx-defaultalternate entries. - Validates whether the
hrefassociated withx-defaultis a valid, non-empty URL. - Verifies that the
x-defaultURL returns a 2xx HTTP status when followed. - Checks whether the
x-defaulthrefis a fully qualified absolute URL (not a root-relative or protocol-relative path). Setx_default_href_is_absolute = FALSEif the value does not include a scheme and host. - Counts the total number of
hreflang="x-default"entries on the page. If more than one is present, setx_default_tag_count > 1. - Extracts the URL scheme (
httporhttps) from thex-defaulthrefvalue and records it inx_default_href_scheme.
What to store
| Field | Type | Comment |
|---|---|---|
has_x_default_hreflang | BOOLEAN | Whether the page declares an x-default hreflang tag |
x_default_href | TEXT | The URL pointed to by the x-default hreflang entry |
x_default_source | TEXT | Detection source: html, header, or sitemap |
x_default_href_status | INT | HTTP status code of the x-default href when fetched |
x_default_href_is_absolute | BOOLEAN | Whether the x-default hreflang href is a fully qualified absolute URL |
x_default_tag_count | INT | Total number of hreflang="x-default" entries found on the page |
x_default_href_scheme | TEXT | URL scheme of the x-default href value (http or https; NULL if no x-default tag exists) |
Condition for trigger
The following trigger rules evaluate x-default hreflang presence and validity.
-
Trigger Rule 1: Missing x-Default Hreflang Tag
- Target Field:
has_x_default_hreflang - Evaluation Logic:
= FALSE - Severity: IMPORTANT
- Diagnostic Message: "No
hreflang="x-default"tag was detected. Google cannot determine which page to show when no language match is found for the visitor's region."
- Target Field:
-
Trigger Rule 2: x-Default Href Unresolvable
- Target Field:
x_default_href_status - Evaluation Logic:
NOT IN (200, 201, 203, 204) - Severity: IMPORTANT
- Diagnostic Message: "The URL referenced by
hreflang="x-default"does not return a successful HTTP response. Search engines may ignore this fallback declaration."
- Target Field:
-
Trigger Rule 3: Multiple x-Default Tags Declared
- Target Field:
x_default_tag_count - Evaluation Logic:
> 1 - Severity: WARNING
- Diagnostic Message: "More than one
hreflang=\"x-default\"tag was detected on this page. Only one x-default entry is valid per page. Duplicates may cause the fallback declaration to be ignored."
- Target Field:
-
Trigger Rule 4: x-Default Href Is Not an Absolute URL
- Target Field:
x_default_href_is_absolute - Evaluation Logic:
= FALSE AND has_x_default_hreflang = TRUE - Severity: WARNING
- Diagnostic Message: "The
hreflang=\"x-default\"href is not a fully qualified absolute URL. Hreflang href values must include scheme and host to be valid."
- Target Field:
Sources
- Google hreflang x-default documentation: https://developers.google.com/search/docs/specialty/international/localized-versions#x-default
- Google managing multi-regional sites: https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites
- MDN rel=alternate documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel
Long description
The hreflang="x-default" tag is a special hreflang value defined by Google to designate a fallback page for users whose browser language or country does not match any explicitly declared hreflang locale.
When a user in Japan (language: ja) visits and no hreflang="ja" is declared, Google uses the x-default URL as the fallback page to index and serve.
Without x-default:
- Google may arbitrarily pick a language version to serve.
- International users from unmatched regions see the wrong language.
- Search result snippets may show incorrect language versions.
Common failure scenarios checked by the crawler:
- x-Default Completely Absent: Google has no fallback page designation and may pick a page arbitrarily.
- Broken x-Default URL: Tag exists but
hrefpoints to a 404 or missing page. - x-Default Pointing to Redirected URL: Hreflang references should point directly to the canonical destination URL, not an intermediate redirect.
How to Fix
Add an x-default hreflang entry inside the page <head> alongside other hreflang declarations. Ensure the x-default href returns HTTP 200, is the canonical homepage or a language-selector landing page, and is included on every page in the hreflang cluster, not just the homepage. Avoid pointing it to a redirecting page or a non-existent URL.