Hreflang Errors and How to Fix Them
Diagnose and fix common hreflang errors including missing return tags, wrong language codes, and non-canonical URLs. Step-by-step solutions.
Last updated: 2026-02-17
Why Hreflang Errors Matter
Hreflang tags are how you tell search engines which language version of a page to serve to which audience. When they work, your French page appears for French users and your Spanish page appears for Spanish users. When they break, search engines ignore your annotations entirely and guess on their own.
The problem is that hreflang is unforgiving. A single syntax error, a missing return tag, or a mismatch with your canonical URL can invalidate an entire set of annotations. Google does not give partial credit. If your hreflang implementation has errors, it gets treated as if it does not exist.
Most hreflang errors fall into a handful of categories. This guide covers each one, explains how to diagnose it, and walks through the fix.
Error 1: Missing Return Tags
This is the most common hreflang error by a wide margin. Every hreflang relationship must be confirmed in both directions.
What It Looks Like
Your English page declares a Spanish alternate:
<!-- On en-us/pricing/ -->
<link rel="alternate" hreflang="en-US" href="https://example.com/en-us/pricing/" />
<link rel="alternate" hreflang="es-MX" href="https://example.com/es-mx/pricing/" />
But the Spanish page does not reference the English page back:
<!-- On es-mx/pricing/ — MISSING the en-US return tag -->
<link rel="alternate" hreflang="es-MX" href="https://example.com/es-mx/pricing/" />
Why It Happens
- Content teams publish a new language version but forget to update the existing versions.
- CMS templates render hreflang tags based on the current page's metadata, and the new language variant was not added to the translation mapping.
- A developer hardcoded hreflang for some pages but not others during a migration.
How to Fix It
Every page in a hreflang set must include <link> tags for every page in the set, including itself. If you have English, Spanish, and French versions, each page must contain three hreflang tags (four if you include x-default).
Audit All Language Versions
Fix the Template Logic
Verify After Deployment
Google Search Console reports missing return tags in the International Targeting report. However, this report can lag by days or weeks, so do not rely on it as your only validation method.
Error 2: Non-Canonical Hreflang URLs
Your hreflang URLs must exactly match the canonical URL of each target page. Any mismatch causes Google to ignore the annotation.
What It Looks Like
Your canonical URL uses HTTPS with a trailing slash:
<link rel="canonical" href="https://example.com/en-us/pricing/" />
But your hreflang tag points to a slightly different URL:
<!-- Any of these mismatches will break hreflang -->
<link rel="alternate" hreflang="en-US" href="http://example.com/en-us/pricing/" />
<link rel="alternate" hreflang="en-US" href="https://www.example.com/en-us/pricing/" />
<link rel="alternate" hreflang="en-US" href="https://example.com/en-us/pricing" />
Common Mismatches
| Mismatch Type | Example |
|---|---|
| Protocol | http:// vs https:// |
| www vs non-www | www.example.com vs example.com |
| Trailing slash | /pricing/ vs /pricing |
| Case sensitivity | /Pricing/ vs /pricing/ |
| Query parameters | /pricing/?ref=nav vs /pricing/ |
| Fragment identifiers | /pricing/#plans vs /pricing/ |
How to Fix It
The fix is straightforward: make your hreflang URLs match your canonical URLs character for character.
If you generate hreflang tags dynamically, derive the URLs from the same source as your canonical tags. Do not construct them independently. If your canonical uses https://example.com/en-us/pricing/, your hreflang must use that exact string.
For sites where canonical URLs are inconsistent across pages, fix the canonical tags first, then align hreflang.
Error 3: Invalid Language or Region Codes
A wrong code does not just affect one annotation. It can cause Google to ignore the entire hreflang set for that page.
Common Code Mistakes
| Wrong Code | Correct Code | Why It Is Wrong |
|---|---|---|
| jp | ja | jp is the country code for Japan. The language code for Japanese is ja. |
| cn | zh | cn is the country code for China. The language code for Chinese is zh. |
| en-UK | en-GB | The ISO 3166-1 code for United Kingdom is GB, not UK. |
| eng | en | Three-letter ISO 639-2 codes are not supported. Use two-letter codes. |
| es-LA | es-419 | There is no ISO region code LA for Latin America. Use es-419. |
| zh-Hans | zh-CN | zh-Hans is a valid script subtag but Google prefers zh-CN for simplified Chinese. |
How to Fix It
Cross-reference every language and region code in your hreflang tags against the ISO 639-1 (languages) and ISO 3166-1 alpha-2 (regions) standards. Pay particular attention to languages where the language code differs from what you might expect based on the country name.
Google does not surface invalid language code errors in Search Console with clear messaging. The annotations simply get ignored silently. You will only notice the problem when international pages underperform or the wrong language version ranks.
Detect Hreflang Errors Automatically
Site Watcher scans your hreflang implementation for missing return tags, invalid codes, and canonical mismatches. Free for 3 targets.
Error 4: Missing x-default Tag
Without x-default, there is no declared fallback for users whose language or region does not match any specified version.
What Happens
When a user in a country you have not targeted (say, someone searching in Norwegian and you only have English and Spanish) hits your hreflang set, Google has no instruction for what to show. It falls back to its own algorithms, which may not choose the page you would prefer.
How to Fix It
Add an x-default annotation to every page in your hreflang set. Point it at whichever page should serve as the global fallback. This is typically your primary language version or a language selector page.
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing/" />
<link rel="alternate" hreflang="en-US" href="https://example.com/en-us/pricing/" />
<link rel="alternate" hreflang="es-MX" href="https://example.com/es-mx/pricing/" />
The x-default URL can be the same as one of your language-specific URLs (often the English version), or it can be a distinct page with a language picker.
Error 5: Conflicting Signals
Hreflang tags do not exist in isolation. Other signals on your site can contradict them, causing Google to disregard your annotations.
Conflicting Canonical Tags
If your English page has a canonical tag pointing to the Spanish page (or vice versa), it contradicts the hreflang declaration. Each language version must have a self-referencing canonical tag.
<!-- WRONG: English page canonicalizing to Spanish -->
<link rel="canonical" href="https://example.com/es-mx/pricing/" />
<link rel="alternate" hreflang="en-US" href="https://example.com/en-us/pricing/" />
Conflicting Redirects
If one language version redirects to another (e.g., your French page 301-redirects to English), the hreflang annotation pointing to the French URL is invalid. Hreflang URLs must return a 200 status code.
Conflicting Noindex Tags
If a page in your hreflang set has a noindex meta tag, Google cannot index it and will ignore the hreflang annotation pointing to it. Every page in a hreflang set must be indexable.
How to Fix It
Audit each page in your hreflang set for:
- Self-referencing canonical tags (each page must canonical to itself)
- 200 status codes (no redirects, no 404s, no 5xx errors)
- No
noindexdirectives on any page in the set - Consistent sitemap inclusion (all language versions should be in the sitemap)
Error 6: Hreflang in Sitemaps with Errors
When you implement hreflang through XML sitemaps, sitemap-specific errors can break your annotations.
Missing URL Entries
If your sitemap contains hreflang annotations for a URL but does not include the corresponding <url> entry for the alternate page, Google may not process the relationship.
Inconsistent Sitemap Updates
When you add a new page, you must update the sitemap entries for all existing language versions to include the new alternate. If only the new page's entry lists all alternates but the existing entries have not been updated, you have missing return tags.
Sitemap Size Limits
Sitemaps have a 50MB uncompressed size limit and a 50,000 URL limit. Hreflang annotations in sitemaps can dramatically increase file size. A site with 10,000 pages and 10 language versions generates 100,000 hreflang entries. If your sitemap exceeds limits, split it into multiple sitemaps.
Diagnosing Hreflang Errors: A Systematic Approach
When hreflang is not working, follow this diagnostic process.
Check Google Search Console
Crawl Your Hreflang Annotations
Compare Against Canonical URLs
Validate Language and Region Codes
Check Status Codes
Look for Conflicting Signals
Preventing Hreflang Errors
Fixing hreflang errors is reactive. Prevention is better.
Centralize Hreflang Logic
Automate Return Tags
Include Hreflang in QA
Monitor Continuously
Quick Reference: Hreflang Error Checklist
Use this checklist after every major site change:
- Every page in the hreflang set includes tags for every other page, including itself
- Every hreflang URL exactly matches the canonical URL of the target page
- All language codes are valid ISO 639-1 two-letter codes
- All region codes are valid ISO 3166-1 alpha-2 codes
- Every hreflang set includes an
x-defaultannotation - Every hreflang URL returns a 200 status code
- No page in the hreflang set has a
noindexdirective - Canonical tags on all pages are self-referencing
- Sitemap-based hreflang entries are complete and within size limits
- No conflicting implementations (HTML head + sitemap for the same URLs)
Hreflang errors are silent killers for international SEO. They do not trigger obvious warnings, they do not cause pages to disappear, and they do not break anything visible. They just quietly prevent your international targeting from working.
Stop Hreflang Errors Before They Spread
Site Watcher monitors your hreflang tags across every page and alerts you when return tags go missing, codes are invalid, or URLs fall out of sync. $39/mo unlimited, free for 3 targets.