Issue #135 · important
Issue 135
What is this issue?
x-Default Hreflang Tag for International Site Root/Homepage
This issue checks whether your international website includes 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.
What This Issue Checks
The audit verifies that pages serving an international audience include an x-default hreflang tag that acts as a fallback for users whose language or region doesn't match any explicitly declared hreflang locale.
What is Considered a Passing Implementation
Your website passes this check when:
- An
hreflang="x-default"tag is present on international pages - The x-default href points to a valid, accessible URL
- The x-default href is a fully qualified absolute URL (including scheme and host)
- Only one x-default tag is declared per page
- The x-default URL returns a successful HTTP status (200-299)
Real-World Example
Passing Implementation:
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
Failing Implementation:
<!-- No x-default tag present -->
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
Why does it matter?
Impact on SEO
Crawlability
The x-default hreflang tag helps search engines understand which page serves as the fallback for unmatched regions. Without it, search engines may not properly index your international homepage or language selector.
Indexability
Google uses the x-default tag to determine which page to index for users in regions not explicitly covered by your hreflang declarations. Missing x-default can lead to incorrect pages being indexed for certain regions.
Rankings
When users in unmatched regions (e.g., someone in Japan visiting an English/French site) search, Google needs to know which page to show them. The x-default tag ensures they see your intended fallback page, improving international ranking signals.
User Experience
Without x-default, international users from unmatched regions may see an arbitrary language version instead of your intended language selector or international homepage. This creates a poor first impression and increases bounce rates.
Duplicate Content
If Google arbitrarily picks a language version to show to unmatched regions, it may create duplicate indexing issues where multiple regions show the same language version instead of the appropriate fallback.
AI Search / AEO
As AI-powered search becomes more prevalent, properly structured x-default tags help AI understand your site's international fallback strategy, ensuring accurate representation in AI-generated answers for users in unmatched regions.
How Resolving This Issue Improves SEO Health Score
Fixing x-default hreflang issues improves your overall SEO health score by:
- Ensuring proper fallback page designation for international users
- Preventing arbitrary language version selection by search engines
- Improving user experience for visitors from unmatched regions
- Strengthening your website's international SEO signals
- Reducing bounce rates from incorrectly targeted international visitors
How to fix it
Practical Recommendations
1. Add x-default Hreflang Tag to International Pages
Include an hreflang="x-default" tag in the <head> section of pages that serve as language selectors or international homepages.
Implementation:
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
2. Point x-default to the Correct Page
The x-default href should point to:
- Your main language selector page, OR
- Your international homepage that automatically detects user language, OR
- A page that lists all available language versions
Examples:
<!-- Option 1: Language selector page -->
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
<!-- Option 2: Auto-detecting homepage -->
<link rel="alternate" hreflang="x-default" href="https://example.com/home" />
3. Use Absolute URLs
Ensure the x-default href is a fully qualified absolute URL including scheme and host:
Correct:
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
Incorrect:
<link rel="alternate" hreflang="x-default" href="/" />
<link rel="alternate" hreflang="x-default" href="//example.com/" />
4. Include x-default on All Pages in the Hreflang Cluster
The x-default tag should be included on every page in your hreflang cluster, not just the homepage.
Example for all pages:
<!-- On ALL pages (en, fr, es, etc.) -->
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="es" href="https://example.com/es/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
5. Ensure x-default URL Returns 200 Status
Verify that the URL referenced in the x-default tag:
- Returns HTTP 200 (OK) status
- Is not a redirect (301, 302)
- Is accessible to search engines
- Is not blocked by robots.txt
6. Use Only One x-default Tag Per Page
Declare only one hreflang="x-default" tag per page. Multiple x-default tags will cause search engines to ignore the fallback declaration.
Priority Order
- First: Add missing x-default hreflang tag to international pages
- Second: Ensure x-default href is a valid absolute URL
- Third: Verify x-default URL returns 200 status
- Fourth: Add x-default to all pages in the hreflang cluster
- Fifth: Remove any duplicate x-default tags
Examples
Example 1: Missing x-Default Hreflang Tag
Scenario
A website serves English and French content with separate pages but has no x-default fallback for international users.
Problematic State (Fails)
<!-- On page: https://example.com/ -->
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<!-- No x-default tag present -->
Result: A user in Japan (language: ja) searches and Google doesn't know which page to show since there's no ja or x-default hreflang.
Corrected State (Passes)
<!-- On page: https://example.com/ -->
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
Result: Google uses https://example.com/ as the fallback page for users in unmatched regions.
Example 2: x-Default URL Returns Error
Scenario
x-default tag exists but points to a broken URL.
Problematic State (Fails)
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link
rel="alternate"
hreflang="x-default"
href="https://example.com/old-homepage/"
/>
<!-- The /old-homepage/ URL returns a 404 error -->
Result: Search engines may ignore the entire hreflang cluster due to invalid x-default reference.
Corrected State (Passes)
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
<!-- The / URL returns 200 OK status -->
Result: Search engines can successfully use the x-default fallback.
Example 3: Multiple x-Default Tags
Scenario
Page declares more than one x-default tag.
Problematic State (Fails)
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/home" />
Result: Search engines ignore the x-default declaration because there are multiple conflicting entries.
Corrected State (Passes)
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
<!-- Only one x-default tag -->
Result: Search engines correctly identify the fallback page.
How PixyScan detects this
PixyScan checks whether your international website includes an hreflang="x-default" tag to serve as a fallback for users whose language or region doesn't match any explicitly declared hreflang locale.
Detection Process
PixyScan follows these logical steps to identify x-default hreflang issues:
1. Scan for x-default Hreflang Declaration
PixyScan scans the HTML <head> section of your page to detect if an hreflang="x-default" tag exists. It looks for:
<link rel="alternate" hreflang="x-default">tags in the HTML- x-default declarations in HTTP
Link:headers - x-default entries in XML sitemaps
2. Extract x-default Information
If an x-default tag is found, PixyScan extracts:
- The URL being referenced (href attribute)
- The source location (HTML head, HTTP header, or sitemap)
- The total number of x-default tags on the page
3. Validate x-default URL
PixyScan checks whether the URL in the x-default tag:
- Is present and not empty
- Is a valid URL format
- Is a fully qualified absolute URL (includes
https://and domain) - Returns a successful HTTP status code (200-299)
4. Check URL Scheme
PixyScan extracts the URL scheme (http or https) from the x-default href value to ensure it uses a proper scheme.
5. Count x-default Tags
PixyScan counts the total number of hreflang="x-default" entries on the page to ensure only one is present.
When the Issue is Flagged
The issue is flagged when any of these conditions are met:
- Missing x-default tag: No
hreflang="x-default"tag is detected on the page - x-default URL unresolvable: The URL referenced by x-default returns an error status (not 200-299)
- Multiple x-default tags: More than one
hreflang="x-default"tag is declared on the page - x-default href not absolute: The x-default href is not a fully qualified absolute URL (missing scheme or host)
When the Issue Passes
The issue passes when:
- An
hreflang="x-default"tag is present - The x-default href points to a valid, accessible URL
- The x-default href is a fully qualified absolute URL
- Only one x-default tag exists on the page
- The x-default URL returns a successful HTTP status (200-299)