Imagine searching Google for a product, clicking a result that looks perfect… and landing on a page written entirely in a language you don’t speak.
It’s a frustrating experience. You found the right page — just not the right version of it.
Now imagine the same scenario happening at scale.
A global company might have English pages for the US, UK, and Australia. Spanish pages for Spain and Latin America. German pages for Germany and Switzerland. From Google’s perspective, many of those pages contain very similar content.
Without clear signals, search engines may struggle to determine which version of a page should appear for users in different countries or languages.
That’s exactly the problem hreflang tags were created to solve.
Hreflang tags tell search engines which language and regional version of a page should be shown to specific audiences. They help ensure users see the most relevant version of your content, based on their language preferences and geographic location.
For internationalwebsites, hreflang implementation is one of the most important foundations of technical SEO.
Get it right, and search engines can properly connect your localized pages, consolidate ranking signals, and deliver the right content to the right audience.
Get it wrong, and things can get messy fast — duplicate content confusion, incorrect pages ranking in the wrong countries, and frustrated users landing on the wrong language version.
In this guide, we’ll break down exactly how hreflang tags work, when you need them, and how to implement them correctly for multilingual and multi-regional websites.
Article Summary
- Hreflang tags are HTML attributes that tell search engines which language and regional version of a page to show users.
- They help search engines understand relationships between alternate language versions of the same page.
- Hreflang tags prevent translated pages from being treated as duplicate content.
- Each hreflang tag must be reciprocal — every page must reference its alternate versions and itself.
- The x-default tag is used as a fallback when no language or region matches the user.
- Hreflang can be implemented in HTML tags, XML sitemaps, or HTTP headers.
- Correct implementation helps search engines serve the most relevant page to users across regions and languages.
What Are Hreflang Tags?
Hreflang tags are HTML attributes that tell search engines which language and regional version of a page should be shown to users.
They act as signals that connect different language versions of the same page, helping search engines understand that these pages are intended for different audiences rather than being duplicate content.
Here’s the challenge.
Search engines crawl billions of web pages, many of which contain extremely similar content across different languages or regional variations. A product page written in English for the US may look nearly identical to the same product page written in English for the UK.
Without additional context, search engines could easily misinterpret those pages as duplicates or struggle to determine which version should appear in search results.
That’s where the hreflang attribute comes in.
Hreflang tags allow website owners to explicitly tell search engines:
- This page is the English version for US users
- This page is the English version for UK users
- This page is the German version for Germany
- This page is the Spanish version for Spain
With that information, search engines can display the most relevant page based on a user’s language preferences and geographic location.
In other words, hreflang helps ensure the right page appears for the right audience.
Why Google Created Hreflang
Google introduced hreflang because international websites were creating a problem for search engines.
Imagine a global e-commerce brand with multiple localized versions of the same page:
- example.com/en-us/product
- example.com/en-gb/product
- example.com/de/product
From a crawler’s perspective, much of the content on these pages is nearly identical. Without additional signals, search engines might interpret them as duplicate content competing against each other in rankings.
But they aren’t duplicates.
They’re regional variations of the same page, intended for different audiences.
Hreflang annotations solve this by clarifying the relationship between those pages.
They tell search engines:
“These pages contain similar content, but they serve different language or regional audiences.”
This prevents search engines from confusing the pages or filtering them out as duplicates, while allowing each localized version to appear in the appropriate regional search results.
Hreflang vs Canonical Tags
One of the most common points of confusion in international SEO is the relationship between hreflang tags and canonical tags.
Both are HTML attributes used to provide signals to search engines, but they serve very different purposes.
A canonical tag tells search engines which version of a page should be treated as the primary version when duplicate pages exist.
An hreflang tag, on the other hand, tells search engines that multiple pages are valid versions of the same content for different audiences.
Think of it this way:
- Canonical tags consolidate duplicates into one preferred URL
- Hreflang tags connect alternate versions of a page across languages and regions
On many international websites, both signals work together.
For example, each localized page typically includes a self-referencing canonical tag while hreflang tags connect that page to its alternate language versions.
This ensures search engines understand both the canonical URL structure and the international targeting relationships between pages.

Pro Tip: Hreflang tags should always reference canonical URLs. If hreflang points to non-canonical pages, redirected URLs, or pages marked noindex, search engines may ignore the entire hreflang setup.
How Hreflang Tags Work
Hreflang works by creating a cluster of related pages, each representing a language or regional variation of the same content.
Every page in that cluster references the others using the hreflang attribute.
This tells search engines that the pages are alternate versions of the same page, intended for different languages or geographic audiences.
For example, a company with English and German versions of a page might create a relationship like this:
- English version → references German version
- German version → references English version
When a user searches, Google evaluates the user’s language preferences and location to determine which version of the page should appear in search results.
Instead of multiple language versions competing against each other, hreflang allows search engines to deliver the most relevant page to each user.
Language Codes and Country Codes
Hreflang uses standardized language and region codes to identify which audience each page targets.
These codes follow internationally recognized standards:
ISO 639-1 language codes represent languages.
Examples include:
- en → English
- de → German
- es → Spanish
- fr → French
ISO 3166-1 country codes represent geographic regions.
Examples include:
- US → United States
- GB → United Kingdom
- DE → Germany
- CA → Canada
These codes can be combined to target specific language-region combinations.
For example:
- en-us → English for the United States
- en-gb → English for the United Kingdom
- fr-ca → French for Canada
Using the correct language and country codes is essential for hreflang tags to function properly. Incorrect codes can cause search engines to ignore the tags entirely.
The Concept of Reciprocal Tagging
Hreflang tags must be bidirectional.
That means if Page A references Page B as an alternate version, Page B must also reference Page A.
Search engines use this reciprocal relationship to confirm that the pages are truly intended to be alternate language versions of each other.
If the reciprocal link is missing, search engines may ignore the hreflang annotations.
For example:
Page A (English) must reference Page B (German)
Page B (German) must also reference Page A (English)
Without this two-way relationship, the hreflang connection may not be recognized.
The x-default Attribute
The x-default hreflang tag is used as a fallback when none of the language or regional versions match the user’s preferences.
It typically points to a global or language selection page.
For example:
A global homepage might include:
- en-us → US English page
- en-gb → UK English page
- de → German page
- x-default → International homepage
If Google cannot determine a clear match for the user’s language or location, it may serve the x-default version instead.
This helps ensure users still land on a relevant page, even when no specific language or regional version applies.
Side Note: Hreflang tags are a signal, not a directive. Search engines generally respect them, but they may occasionally choose a different page if other signals suggest a better result for the user.
When You Should Use Hreflang Tags
You should use hreflang tags when your website contains multiple language or regional versions of the same page.
They help search engines understand which version of a page should appear for users in different locations or language settings.
Now, let’s talk about the moment most companies realize they need hreflang.
It usually happens when someone in the UK Googles their company… and the result that appears is the US version with dollar prices, American spelling, and shipping that mysteriously stops at the Atlantic Ocean.
Or when a German user clicks a search result and lands on an English page — even though a perfectly good German version exists.
This isn’t a translation problem.
It’s a search engine interpretation problem.
Without hreflang tags, search engines may struggle to determine which language versions of your pages should appear in different markets. And when that happens, users often land on the wrong page.
Hreflang tags solve that problem by helping search engines serve the most relevant page for each audience.

Multilingual Websites
Multilingual websites are the most common use case for hreflang.
These sites publish the same content translated into different languages, allowing users to access the website in their preferred language.
For example:
- English version of a page
- Spanish version of the same page
- German version of the same page
Without hreflang annotations, search engines might struggle to understand that these pages are intended as alternate language versions of the same content.
In some cases, search engines might even treat the pages as duplicate content.
Hreflang tags clarify that each page serves a different language audience. This helps search engines deliver the correct language version in search results and improves the overall user experience.
Multi-Regional Websites
Sometimes the language stays the same — but the region changes.
English is a perfect example.
A company might have separate English pages for:
- United States
- United Kingdom
- Australia
- Canada
The language is identical, but the content may include regional differences such as currency, pricing, shipping policies, or spelling variations.
Without hreflang tags, search engines might show the wrong regional version of a page in search results.
This can create confusing experiences for users who expect region-specific information.
Hreflang tags help search engines understand these regional variations and deliver the most appropriate version of a page based on the user’s location.
Global E-commerce Sites
If there’s one type of website where hreflang mistakes cause chaos, it’s e-commerce.
Picture a global retailer selling the same product across multiple regions.
The product pages might look almost identical, but small details matter:
- Currency differences
- Shipping options
- Product availability
- Regional pricing
- Local tax information
Without hreflang tags, search engines might show users the wrong version of the product page.
A customer in Germany might land on the US store. A shopper in Canada might see UK prices. And suddenly, the checkout experience gets very confusing very quickly.
For global e-commerce brands, hreflang tags help ensure users land on the correct localized product pages, which improves both user experience and conversion rates.
Pro Tip: If your international website uses automatic redirects based on location, hreflang tags are still important. Search engines often crawl from different locations and may not experience those redirects the same way users do. Hreflang provides a clear signal about which version of a page should appear in search results.
Methods for Implementing Hreflang
Once you decide to use hreflang tags, the next question becomes: where do they go?
The good news is that there are three supported implementation methods.
The slightly less good news is that hreflang implementation can become complex quickly — especially on large international websites.
And if implemented incorrectly, search engines may ignore the entire setup.
Think of hreflang implementation like organizing a group dinner reservation.
Everyone needs to know where they’re going, when they’re arriving, and who else is attending.
If one person forgets to confirm, the entire arrangement starts to fall apart.
Hreflang works the same way. Every page must reference the others correctly for the system to function.
There are three ways to implement hreflang.

HTML Hreflang Tags
The most common implementation method is placing hreflang tags inside the HTML <head> section of each page.
These tags use the link rel=”alternate” attribute to identify alternate language or regional versions of the same page.
Example structure:
<link rel=”alternate” hreflang=”en-us” href=”https://example.com/us/page” />
<link rel=”alternate” hreflang=”en-gb” href=”https://example.com/uk/page” />
<link rel=”alternate” hreflang=”de” href=”https://example.com/de/page” />
Each page references all alternate language versions, including itself.
This allows search engines to understand the complete relationship between pages.
HTML implementation works well for smaller multilingual websites, where each page has a manageable number of alternate versions.
XML Sitemap Hreflang
For larger websites, hreflang is often implemented in XML sitemaps.
Instead of placing hreflang annotations inside the HTML of every page, the relationships between language versions are defined inside the sitemap.
This approach can be much easier to manage when a website contains thousands of pages across multiple languages.
A sitemap entry might look like this:
<url>
<loc>https://example.com/en/page</loc>
<xhtml:link rel=”alternate” hreflang=”en” href=”https://example.com/en/page”/>
<xhtml:link rel=”alternate” hreflang=”de” href=”https://example.com/de/page”/>
</url>
Many large international websites prefer sitemap-based hreflang implementation because it allows developers to manage all language relationships in one centralized file.
HTTP Header Implementation
Some content doesn’t have an HTML <head> section.
For example:
- PDF files
- Downloadable resources
- Other non-HTML files
In these cases, hreflang can be implemented using HTTP response headers.
These headers communicate alternate language versions directly through the server response.
Example header structure:
Link: <https://example.com/en/file.pdf>; rel=”alternate”; hreflang=”en”
Link: <https://example.com/de/file.pdf>; rel=”alternate”; hreflang=”de”
This method ensures that non-HTML content can still be properly associated with its alternate language versions.
Side Note: All three implementation methods achieve the same goal. But they should not be mixed randomly across the same page set unless managed very carefully. Consistency is key when implementing hreflang across large international websites.
Hreflang Tag Examples
If hreflang explanations sometimes feel abstract, the code examples are where everything finally clicks.
Think of hreflang like a group introduction at a conference.
Each page basically says:
“Hi, I’m the English version. My German colleague is over there, and our Spanish colleague is over there. We’re all versions of the same page — just speaking different languages.”
Search engines then decide which version to show depending on the user’s language and region.
Let’s look at a few practical examples.
Basic Hreflang Implementation
The simplest hreflang setup involves two language versions of the same page.
For example:
- English version
- German version
Each page references both versions using link rel=”alternate”.
Example implementation in the HTML <head> section:
<link rel=”alternate” hreflang=”en” href=”https://example.com/en/page” />
<link rel=”alternate” hreflang=”de” href=”https://example.com/de/page” />
<link rel=”alternate” hreflang=”x-default” href=”https://example.com/” />
This tells search engines that:
- The page has an English version
- A German version
- A default fallback page
When a German user searches, the German page may appear in search results. When an English user searches, the English page is more likely to appear.
Multi-Country Example
Things get slightly more complex when multiple regions share the same language.
For example, a company might have English pages for:
- United States
- United Kingdom
- Canada
The implementation could look like this:
<link rel=”alternate” hreflang=”en-us” href=”https://example.com/us/page” />
<link rel=”alternate” hreflang=”en-gb” href=”https://example.com/uk/page” />
<link rel=”alternate” hreflang=”en-ca” href=”https://example.com/ca/page” />
Each page still contains the full set of hreflang annotations pointing to all alternate versions.
This allows search engines to show the most relevant regional version of the page based on the user’s location.
x-default Example
The x-default tag provides a fallback option when no language or regional match exists.
It often points to a global homepage or language selector.
Example:
<link rel=”alternate” hreflang=”en-us” href=”https://example.com/us/” />
<link rel=”alternate” hreflang=”de-de” href=”https://example.com/de/” />
<link rel=”alternate” hreflang=”x-default” href=”https://example.com/” />
If Google cannot determine a clear match between a user’s language and the available versions, it may serve the x-default page.
This helps ensure users still land somewhere useful instead of the wrong localized page.
Pro Tip: Hreflang tags should always use fully qualified URLs (including https://). Relative URLs can lead to crawling errors or hreflang annotations being ignored.
Common Hreflang Implementation Mistakes
Hreflang is one of those technical SEO features where small mistakes can cause big problems.
And unfortunately, those mistakes are extremely common.
It’s not unusual for international websites to launch with partially implemented or broken hreflang setups that quietly confuse search engines for months.
Let’s look at a few of the most common issues.
Missing Return Tags
Hreflang tags must be reciprocal.
If Page A references Page B as an alternate version, Page B must also reference Page A.
Without this reciprocal relationship, search engines may ignore the hreflang tags entirely.
Example problem:
Page A → references Page B
Page B → does not reference Page A
This breaks the hreflang cluster and can prevent search engines from properly interpreting the relationship between pages.
Incorrect Language Codes
Hreflang relies on standardized language and region codes.
Using invalid or incorrect codes can cause search engines to ignore the tags.
For example:
Correct codes:
- en-us
- en-gb
- de-de
Incorrect codes might include:
- en-uk (should be en-gb)
- english-us
- unsupported language-region combinations
Because hreflang tags rely on ISO language and country standards, even small mistakes can invalidate the implementation.
Broken URLs in Hreflang
Every URL referenced in hreflang annotations must be valid.
Common problems include:
- URLs that return 404 errors
- Redirected URLs
- URLs blocked by robots.txt
- URLs marked noindex
Search engines expect hreflang tags to point to working canonical URLs.
If the referenced URLs are broken or inconsistent, search engines may ignore the annotations.
Conflicts with Canonical Tags
Another common mistake happens when hreflang tags conflict with canonical tags.
For example:
- A German page includes hreflang pointing to itself
- But the canonical tag points to the English version
This sends conflicting signals to search engines.
Canonical tags say: “This page is a duplicate of another page.”
Hreflang tags say: “This page is an alternate language version.”
When these signals conflict, search engines may ignore the hreflang setup altogether.
Side Note: Many hreflang issues don’t break rankings immediately. Instead, they quietly cause the wrong page versions to appear in the wrong countries, which can go unnoticed until international traffic starts behaving strangely.
How to Audit and Fix Hreflang Issues
Diagnosing hreflang problems can be surprisingly complex.
International websites often contain hundreds or thousands of language and regional page variations. Even a small implementation mistake can break the entire hreflang relationship between pages.
Tools like Google Search Console, Screaming Frog, and Sitebulb can help identify missing return tags, incorrect language codes, or broken URLs within hreflang annotations.
But identifying issues is usually the easy part.
Fixing them safely across an entire international website is where things get tricky.
Hreflang implementations often involve multiple systems: CMS logic, templates, XML sitemaps, canonical tags, redirects, and URL structures. Changes in one area can unexpectedly affect another.
That’s why hreflang troubleshooting is typically handled as part of a broader technical international SEO strategy.
Once you know hreflang issues exist, the safest approach is often to work with experienced technical SEO specialists who can diagnose the root cause and implement fixes without disrupting existing search visibility.
Because with hreflang, the difference between “fixed” and “accidentally worse” can be just a few lines of code.
Hreflang Best Practices for SEO
Hreflang sounds simple in theory.
Add a few tags, tell Google which pages belong to which language, and voilà — international SEO solved.
In practice? It’s a little more like assembling IKEA furniture without the manual. The parts all seem straightforward until you realize one missing screw causes the entire thing to collapse.
Hreflang implementations work the same way. The rules are simple, but the execution has to be precise.
Here are a few best practices that help ensure search engines interpret your hreflang setup correctly.
Maintain Consistent URL Structures
International websites work best when their URL structures follow clear, predictable patterns.
For example:
- example.com/en/
- example.com/de/
- example.com/fr/
Or:
- example.com/us/
- example.com/uk/
- example.com/au/
Consistent URL structures make it easier for search engines to understand relationships between localized pages.
They also make hreflang implementation easier to manage across large websites.
When language versions follow predictable patterns, developers can implement hreflang annotations programmatically instead of manually configuring each page.
Use Self-Referencing Hreflang
Every page that uses hreflang should include a self-referencing hreflang tag.
In other words, each page should reference itself as one of the alternate language versions.
Example:
The English page includes:
<link rel=”alternate” hreflang=”en-us” href=”https://example.com/us/page” />
Even though it’s already on that page.
This may seem redundant, but it helps search engines confirm that the page belongs to the hreflang cluster.
Without self-referential tags, search engines may interpret the implementation incorrectly.
Keep Language Versions Equivalent
One of the biggest mistakes international websites make is treating translated pages like completely separate content.
For hreflang to work properly, alternate language versions should represent equivalent pages.
For example:
- The English product page should match the German product page.
- The US pricing page should match the UK pricing page.
If the pages diverge significantly — different content, different structure, or entirely different intent — search engines may struggle to treat them as alternate versions.
Hreflang works best when each language version represents the same page adapted for a different audience.
Pro Tip: If your translated pages are significantly different from each other, they may not belong in the same hreflang cluster. In those cases, they may be better treated as separate pages targeting different search intents.
Hreflang for Large International Websites
Hreflang implementation becomes significantly more complex as websites scale.
Adding hreflang tags to a handful of translated pages is manageable.
Adding hreflang relationships across thousands of pages and multiple languages quickly becomes a technical challenge.
Large international websites often rely on automated systems and structured processes to manage hreflang correctly.
Let’s look at a few common scenarios.
E-commerce Stores
Global ecommerce platforms frequently operate across multiple countries and languages.
This creates a complicated mix of:
- Language variations
- Regional pricing
- Product availability differences
- Localized shipping rules
Product pages may exist in several localized versions, each targeting a specific market.
For example:
- US product page
- UK product page
- German product page
- French product page
Hreflang tags allow these pages to coexist without competing against each other in search results.
Instead of forcing search engines to choose one version, hreflang clarifies that each page serves a different regional audience.

SaaS Platforms
Many SaaS companies build localized landing pages for different markets.
For example:
- English landing pages for North America
- Spanish landing pages for Latin America
- German landing pages for Europe
These pages often share the same structure but include localized messaging, pricing, and product details.
Hreflang tags help search engines serve the appropriate version of each landing page to users in the relevant markets.
Without hreflang, search engines may show the wrong regional version of a page — or treat the pages as duplicates.

Global Content Hubs
Blogs, knowledge bases, and documentation hubs also benefit from hreflang.
Large international publishers frequently translate articles into multiple languages to serve global audiences.
When implemented correctly, hreflang tags allow each language version of an article to rank independently in its target market.
This allows global content teams to expand their reach without creating duplicate content conflicts.
Side Note: At scale, hreflang implementation is usually managed through CMS automation or XML sitemaps, rather than manually placing tags in individual pages.
Hreflang vs Other International SEO Signals
Hreflang tags are powerful — but they’re not the only signal search engines use to determine geographic relevance.
International SEO typically relies on several signals working together.
Think of hreflang as part of a larger location-targeting toolkit.
Geo-Targeting in Google Search Console
Google Search Console allows website owners to set geographic targeting preferences for certain types of websites.
This is primarily used for websites that use generic top-level domains like .com or .net.
For example, a .com website may set its primary target country to Canada.
However, this type of geo-targeting operates at the domain or subdomain level, while hreflang operates at the page level.
Hreflang allows individual pages to target different regions even within the same domain.
ccTLD vs Subdomain vs Subdirectory
Website structure also plays a role in international SEO.
Companies commonly use one of three structures for international websites.
Country-Code Top-Level Domains (ccTLDs)
Example:
These provide the strongest geographic signal but require separate domains.
Subdomains
Example:
Subdomains allow regional separation while maintaining a shared root domain.
Subdirectories
Example:
- example.com/fr/
- example.com/de/
Subdirectories are often the easiest structure to manage and consolidate domain authority.
Regardless of which structure a website uses, hreflang tags help search engines understand the relationships between localized pages.
They provide explicit signals about language and regional targeting that structural signals alone cannot always communicate.

Final Thoughts
International SEO introduces a new layer of complexity.
Suddenly, it’s not just about ranking a page.
It’s about ensuring the right version of that page appears for the right audience in the right region.
That’s exactly what hreflang tags were designed to solve.
When implemented correctly, hreflang helps search engines understand relationships between language versions of your pages, prevents duplicate content confusion, and ensures users see the most relevant content for their language and location.
But as many international websites discover, hreflang implementation can quickly become complex.
Between language codes, reciprocal tags, canonical signals, XML sitemaps, and regional page variations, even small mistakes can cause search engines to ignore the setup entirely.
Which is why hreflang is best treated as part of a broader international SEO strategy.
Because when everything works correctly, hreflang quietly does its job in the background — helping search engines connect the right users with the right pages across languages and markets.
Need Help With International SEO?
Implementing hreflang correctly across a global website requires careful planning, technical precision, and ongoing monitoring.
At SEO Sherpa, our technical SEO specialists help international businesses implement hreflang, resolve localization issues, and build scalable international search strategies.
If your website targets multiple countries or languages and you want to ensure search engines are showing the correct version of your pages, our team can help.
Book a free discovery call and we’ll review your international SEO setup and identify opportunities to improve global search visibility.

















Leave a Reply