For example, incorrect language code formats or incomplete link paths can prevent search engines from properly recognizing the target language or region of a page. In some cases, this can even cause multilingual pages to compete with each other for traffic, missing the intended audience.
This article focuses on practical technical implementation and summarizes 7 common hreflang configuration errors. It’s recommended to regularly verify your settings with tools to avoid minor mistakes that can drag down overall SEO performance.

Language or Region Code Format Errors
For example, using uppercase letters (like EN-US
) or typos (like writing zh-CN
as zh-CH
) can lead search engines to misinterpret or ignore your hreflang tags.
Even if a code looks technically correct (like es-ES
instead of just es
), the extra detail might interfere with proper matching.
The impact can be serious — for instance, Spanish users might be sent to a Portuguese page just because the tags weren’t set up cleanly.
ISO Code Standards
hreflang codes consist of two parts: “language” and “region,” and they must strictly follow ISO standards:
- Language code: Must use lowercase letters from the ISO 639-1 standard (like
en
, es
, zh
), with only 2-letter abbreviations. - Region code: Optional, and should use uppercase letters from ISO 3166-1 (like
US
, GB
, CN
), also as 2-letter country codes. - Combination format: Language and region are separated by a hyphen, like
en-US
(American English), or zh-CN
(Simplified Chinese).
Special cases:
- If you only use a language code (like
fr
), it targets all French-speaking users regardless of region. - Traditional Chinese should use
zh-Hant
(Traditional Chinese) or zh-Hant-TW
(Taiwan Traditional), instead of zh-TW
(which might be misread as Simplified Chinese in Taiwan).
Typical Mistakes and Their Consequences
Error 1: Case sensitivity issues
- Examples:
EN-us
(language uppercase + region lowercase), Zh-cn
(capitalized language). - Impact: Search engines may completely ignore these tags, so the page doesn’t match its intended audience.
Error 2: Typos or invalid codes
- Examples:
pt-BZ
(Brazil’s correct code is BR
), eu
(Basque – some engines may not support lesser-known languages). - Impact: Pages in rare languages or with incorrect codes may not get indexed properly, and traffic could default to another version.
Error 3: Redundant or invalid combinations
- Examples:
es-ES
(Spanish + Spain — in most cases es
is enough), en-US-UK
(invalid multi-region string). - Impact: Too much info can confuse search engines, which may favor simpler competing pages instead.
Recommended Tools and Validation Methods
- Google’s hreflang Testing Tool: Enter a URL to see if tags are being properly parsed (used with Search Console).
- Screaming Frog: Crawl your site and filter hreflang tags. Paid version lets you export issues in bulk.
- Hreflang Validator (third-party tool): Free online checker that highlights format issues and link conflicts.
Step-by-step Fix (WordPress Example)
Check your existing code: Use a plugin (like Yoast SEO) or inspect the page source to find your <link rel="alternate" hreflang="..." />
tags.
Bulk Replace Incorrect Codes:
- If you’re using a multilingual plugin (like WPML), go to the language settings and directly update the “language code” format.
- If you’re editing manually, make sure all pages follow a consistent format (e.g., globally replace
EN
with en
).
Adding Region Codes (Optional):
- Only add region codes when you need to target specific areas (like
en-GB
for UK users). Otherwise, stick with the plain language code (like fr
).
Re-verify: Use tools to double-check that the updated pages return a 200 status code and have no crawl errors.
Not Using Full Absolute URLs
Many site owners mistakenly believe that using relative paths (like /de/page
) or omitting the protocol (like example.com/de
) simplifies setup—but it actually causes serious issues.
For example, if both http
and https
versions exist, skipping the protocol may lead search engines to treat them as separate pages, diluting SEO weight.
Likewise, if your site uses subdomains or subdirectories and doesn’t stick to full URLs, it can cause path confusion—like mixing mobile and desktop URLs—which invalidates tags.
What Absolute URLs Are and Why They Matter
Absolute URLs must include the protocol (http://
or https://
), full domain, and path (like https://www.example.com/de/page
).
Why It Matters:
- Search engines need to clearly distinguish different pages. A relative path (like
/de/page
) might get interpreted under any domain version (e.g., http
or https
), causing duplicate content. - When using subdomains or subdirectories, leaving out the full path can confuse search engines about which site the page belongs to (like
de.example.com/page
vs. www.example.com/de/page
being seen as unrelated).
Common Problem Scenarios:
- Pages have both
http
and https
versions, but the hreflang
tag lacks the protocol—splitting SEO weight. - Same content used for mobile and desktop, but URLs differ (like
m.example.com/de
vs. example.com/de
) without using absolute URLs to link them properly.
Common Mistake Scenarios and Their Consequences
Mistake 1: Relative Paths or Missing Protocol
Bad Examples:
<link hreflang="de" href="/de/page" />
(relative path)<link hreflang="es" href="www.example.com/es/page" />
(missing https://
)
Consequences:
- Search engines might interpret
/de/page
as http://example.com/de/page
, but your actual page may use https
, making the tag invalid. - Pages under different protocols (HTTP/HTTPS) may be treated as separate entities, leading to duplicate content and diluted SEO value.
Mistake 2: Inconsistent Use Across Subdomains
- Bad Example: The main site uses
https://example.com/fr/page
, but the French subsite uses https://fr.example.com/page
, and the hreflang tags don’t point to each other using absolute URLs. - Impact: Search engines can’t link the subdomain and the main site page, so French users might be sent to the default language page.
Error 3: Dynamic parameters not standardized
- Example:
<link hreflang="ja" href="https://example.com/page?lang=ja" />
(includes tracking parameters) - Impact: Search engines may treat them as different pages (like
?lang=ja
and ?lang=ja&utm=ads
), resulting in incomplete tagging coverage.
How to detect with tools
- Google Search Console:
Check the “Coverage” report for errors caused by “Duplicate pages” or “Missing hreflang tags” to spot incomplete URLs. - Screaming Frog:
After crawling the site, filter by hreflang
tags and check if all href
attributes are absolute URLs (filter for //example.com
or /path
). - Sitebulb:
In the “International SEO Audit” report, it highlights “Incomplete hreflang URLs” and suggests fixes.
Fixes & Practical Steps
For CMS platforms (like WordPress):
Plugin Settings:
If using Yoast SEO or similar plugins, go to “Multilingual Settings” and force “Generate absolute URLs” (usually by turning off the “Relative URLs” option).
Database Batch Replace:
Use an SQL command or plugin (like Better Search Replace) to swap href="/
with href="https://www.example.com/
.
Manual Code Fix:
In your HTML or server-side rendering logic, make sure all hreflang links are fully constructed, like this:
Server Config:
- Force protocol consistency: Use
.htaccess
or Nginx settings to auto-redirect http
to https
to avoid mixed content. - URL normalization: Use 301 redirects for variations of the same content (like
/de
and /de/
) to ensure one unique absolute URL.
Missing self-referencing hreflang tags
For example, a French page that only links to English, Spanish, etc., without specifying hreflang="fr"
pointing to itself.
Search engines might not be able to determine the language ownership of the page, which means it may not show up correctly in French search results.
The Role and Importance of Self-Referencing Tags
A self-referencing tag is when a page includes an hreflang tag that points back to itself (e.g. the French version should contain <link rel="alternate" hreflang="fr" href="its own URL"/>
).
Main benefits:
- Clearly tells search engines what language/region the current page is for, so it won’t be mistakenly treated as a secondary version of another page.
- Helps form a closed hreflang loop (all versions link to each other), which ensures ranking signals are passed correctly.
Consequences of Missing Hreflang:
- Search engines might treat the page as having "no declared language" and assign it to the default language directory, which can lead to loss of traffic from your target users.
- In multilingual competition scenarios (e.g., both English and Spanish pages lack self-referencing), this might trigger internal duplicate content issues.
Common Mistakes & Case Studies
Mistake 1: Misusing hreflang on Single-Language Sites
- Scenario: A site only has one language version, but adds hreflang links pointing to non-existent versions in other languages.
- Example: A monolingual English site adds
hreflang="en"
pointing to itself, but also incorrectly links to a non-existent hreflang="es"
page, which confuses search engines.
Mistake 2: Misconfigured Multilingual Plugins
- Example Scenario: When using the WPML plugin, the “Auto add self-referencing hreflang” option isn’t checked.
- Outcome: The generated tags only contain links to other language versions, missing the current page declaration.
Mistake 3: Incomplete Tags on Dynamic Pages
- Example Scenario: On JavaScript-rendered pages (like those using React or Vue), hreflang tags aren’t correctly injected into the
<head>
section. - Result: Search engine crawlers might not detect dynamically generated self-referencing hreflang tags.
Detection Tools & Methods
Step 1: Manual Source Code Check
- On the page, press
Ctrl+U
to view the source, then search for hreflang="xx"
to check if there’s a tag pointing to the current URL (note: xx
is the language code for the current page).
Step 2: Google Search Console Verification
- Go to the "URL Inspection Tool", enter the page URL, and check the "International Targeting" report — if it says "Missing self-referencing hreflang tag", then this issue exists.
Step 3: Hreflang Validator Tool
- Enter your page URL into the tool; it’ll list all related hreflang links and highlight missing self-references in red.
Fixes & Practical Steps
Fixing via CMS (WordPress example):
Correct Plugin Settings:
- If using Yoast SEO: Go to "Advanced Settings" and enable "Add self-referencing hreflang".
- If using WPML: Go to “Language Settings” → “SEO Options” and check “Include self link”.
Manual Fix (For Static Sites or Custom Code):
Inside the page's <head>
section, add the following code (example for a French page):
Dynamic Page Rendering Fix (e.g., React):
In server-side rendering (SSR), dynamically generate a self-referencing tag based on the current page language:
Closed Loop Linking Principle & Its Importance
The core rule of hreflang is: All related pages must link to each other to form a complete loop. For example:
- The German page (
de
) should link to the English (en
), French (fr
), and other versions. - The English and French pages must also link back to the German page.
Why This Matters:
- SEO Equity Flow: Closed linking helps search engines understand that the pages are equivalent in different languages, preventing diluted ranking signals.
- Duplicate Content Protection: If only one page links to others but not vice versa (e.g., EN links to DE but not the other way around), search engines may treat them as separate content and penalize for duplication.
Exceptions:
- Single-language pages (like English only) don’t need a full loop, but still require a self-referencing tag.
- Regional variants (like
en-US
and en-GB
) should link to each other, but don’t need to link to other languages.
Common Link Break Scenarios & Their Impact
Scenario 1: New language version added but old pages not updated
- Example: A news site adds a Japanese version (
ja
) but doesn’t update existing English and Chinese pages to include hreflang links to the new Japanese version. - Result: The Japanese page becomes an “orphan page,” and search engines only index the unlinked pages in other languages.
Scenario 2: CMS plugin logic flaw
- Example: A WordPress multilingual plugin (e.g., Polylang) fails to add new language links to existing content during bulk generation.
- Result: Some language relationships break, and users can’t switch to the new language on older content.
Scenario 3: Dynamic parameters cause link mismatch
- Example: The Spanish page uses a URL parameter (e.g.,
?lang=es
), but other language pages don’t include this parameter in their hreflang tags. - Result: Search engines treat the
es
page as unrelated content.
Tools & Debugging Methods
Tool 1: Screaming Frog
- In crawl results, go to the “Hreflang” tab and filter for “Missing Reciprocal Links.”
- Action: Export the error list and locate URL groups missing closed-loop links.
Tool 2: Sitebulb
- In the “International SEO Audit” report, check for “Unreciprocated hreflang links” warnings. These highlight broken links and missing language associations.
Tool 3: DeepCrawl
- Set up custom rules to monitor multilingual relationships, with weekly auto-reports for new broken link issues.
Fixing Strategies & Practical Steps
Strategy 1: CMS plugin bulk fix (e.g., Shopify)
Go to the multilingual plugin (e.g., Langify) settings and enable the “Auto-link all language versions” option.
In "Template Settings", make sure the hreflang tag logic includes looping through all language versions:
Option 2: Manual Code Fix (Static Sites)
Create a mapping list (like an Excel sheet) for each language version listing all URLs that need to be interlinked.
Add tags on the page based on the list, for example:
Make sure to also update the German and French pages' hreflang tags to include the English page link.
Option 3: Server-Side Automation (e.g. Nginx)
Use reverse proxy and mapping rules to dynamically generate hreflang tags:
Conflict with Canonical Tags
For example, if a German product page's canonical tag points to the English main site page, search engines will consider the German page a duplicate of the English one and may refuse to serve it to German users.
A more common problem is that many CMS systems default all language versions' canonicals to point to the main language page (like x-default
), causing other language pages not to be indexed independently.
Conflict Mechanism and Priority Rules
Search engines' priority order when processing hreflang and canonical tags:
Canonical has priority: If page A's canonical points to page B, the search engine treats A as a copy of B, ignoring any hreflang declarations on A.
Scenarios where hreflang fails:
- French page's canonical points to English page → French page won't be served to French users.
- All language versions' canonical tags point to the main site → all language pages are seen as duplicates.
Exception rule:
- If the canonical tag points to itself (i.e.,
<link rel="canonical" href="current page URL"/>
), hreflang works as expected.
Common Mistakes and Their Consequences
Mistake 1: Conflicting Default Settings in Multilingual Plugins
- Example: The Yoast SEO plugin in WordPress sets the canonical of multilingual pages to the main language page by default. For instance, the canonical tag on a German page might be
<link rel="canonical" href="https://example.com/en/page"/>
. - Consequence: The German page is treated as a duplicate of the English version, preventing it from showing up in German search results. This can result in traffic dropping by more than 50%.
Mistake 2: Dynamic Parameters Causing Issues
- Example: A URL with a language parameter (like
example.com/page?lang=de
) has a canonical tag pointing to the non-parameter version (example.com/page
), which doesn’t include an hreflang tag. - Consequence: The German page with the parameter doesn’t get indexed, so users only see the default language page when searching.
Mistake 3: Regional Variants Not Declared Independently
- Example: The
en-US
page has a canonical pointing to the general English page (en
), making search engines think the US English version isn’t unique. - Consequence: Users in the US might end up on the
en
page (e.g., British English), which hurts the localized user experience.
Tools and Troubleshooting Methods
Tool 1: Google Search Console
- Go to the “Coverage” report, filter under the “Excluded” tab for items like “Duplicate page” or “Submitted URL not selected as canonical” to check if canonical issues are breaking hreflang tags.
Tool 2: Screaming Frog
- After crawling your site, filter pages that have both hreflang and canonical tags, and check if the canonical points to a different page (not itself).
- Export the data and filter with the condition:
Canonical != Self-URL
.
Tool 3: DeepCrawl
- Set up custom alert rules: trigger a warning whenever the hreflang and canonical target don’t match.
Fixes and Implementation Steps
Fix 1: Adjusting CMS Plugin Settings (using Yoast SEO as an example)
- Go to the multilingual settings and disable the option that forces all canonicals to point to the main language version.
- In “Advanced Settings,” enable the option to generate separate canonical tags for each language version.
Fix 2: Manual Code Changes
In the page’s <head>
, make sure the canonical tag points to the page’s own URL, like so:
Fix 3: Server-Side Configuration (e.g., Nginx)
Dynamically generate the canonical tag based on the current language version:
For instance, if a dynamically generated page times out and doesn’t fully load, the <head>
might be missing the hreflang tags;
Or if the mobile version returns a 302 (temporary redirect) instead of a 200 OK status, search engines might give up on crawling it.
Some CDNs or firewall rules might block crawler requests, making language-specific pages inaccessible in certain regions.
For example, a Spanish page might have multiple URLs with different parameters (like /es/page?ref=facebook
and /es/page?ref=email
), and search engines treat each as separate pages, leading to duplicate content crawling.