Skip to main content

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.

  1. Issues an HTTP GET to the target URL.
  2. Reads raw response bytes (no JavaScript rendering).
  3. Parses the <head> block for all <link rel="alternate" hreflang="..."> tags.
  4. Searches the collected hreflang values for the literal string x-default.
  5. Records the href URL associated with the x-default tag.
  6. Also inspects the HTTP Link: response header for x-default alternate entries.
  7. Validates whether the href associated with x-default is a valid, non-empty URL.
  8. Verifies that the x-default URL returns a 2xx HTTP status when followed.
  9. Checks whether the x-default href is a fully qualified absolute URL (not a root-relative or protocol-relative path). Set x_default_href_is_absolute = FALSE if the value does not include a scheme and host.
  10. Counts the total number of hreflang="x-default" entries on the page. If more than one is present, set x_default_tag_count > 1.
  11. Extracts the URL scheme (http or https) from the x-default href value and records it in x_default_href_scheme.

What to store

FieldTypeComment
has_x_default_hreflangBOOLEANWhether the page declares an x-default hreflang tag
x_default_hrefTEXTThe URL pointed to by the x-default hreflang entry
x_default_sourceTEXTDetection source: html, header, or sitemap
x_default_href_statusINTHTTP status code of the x-default href when fetched
x_default_href_is_absoluteBOOLEANWhether the x-default hreflang href is a fully qualified absolute URL
x_default_tag_countINTTotal number of hreflang="x-default" entries found on the page
x_default_href_schemeTEXTURL 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."
  • 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."
  • 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."
  • 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."

Sources

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 href points 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.