How to Use hreflang Correctly for International SEO
Share
When a website serves users in multiple countries or languages, search engines need clear signals about which version of a page should appear for each audience. This is where hreflang SEO becomes important.
Hreflang helps search engines understand the relationship between localized versions of a webpage. When implemented correctly, hreflang tags can help users in different countries find the most relevant language or regional version of your content, improving international visibility and the overall search experience.
However, hreflang implementation can become complicated quickly. Incorrect language codes, missing return tags, conflicting canonical URLs, and incomplete page mappings can all cause problems. Understanding how hreflang works and following a consistent implementation strategy is therefore essential for effective international SEO.
What Is hreflang in SEO?
Hreflang is an HTML attribute that tells search engines that a page has alternative versions intended for different languages or geographic regions.
For example, suppose a company has:
-
An English page for the United States
-
An English page for the United Kingdom
-
A French page for France
-
A Spanish page for Spain
Hreflang tags can communicate these relationships to search engines.
A typical hreflang annotation looks like this:
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
The en-us value indicates English content intended for users in the United States.
Similarly:
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
indicates an English version intended for the United Kingdom.
The goal is not simply to tell search engines that a page has been translated. Hreflang provides information about the intended language and regional audience for each URL.
Why Hreflang Matters for International SEO
International SEO becomes more complicated as you expand into different markets. A search engine may find several pages containing very similar or identical content and have difficulty determining which version is most appropriate for a particular searcher.
Hreflang provides an additional signal about your intended audience.
Correct hreflang implementation can help:
-
Show the appropriate regional page in search results
-
Connect equivalent international URLs
-
Improve the experience for multilingual audiences
-
Reduce the likelihood of users landing on the wrong regional version
-
Support international website expansion
-
Make your localization structure clearer to search engines
For example, someone searching from France may be better served by a French-language page than an English version of the same content. Hreflang helps establish that relationship.
How to Implement Hreflang Correctly
There are three common methods for implementing hreflang: HTML tags, HTTP headers, and XML sitemaps.
1. Use HTML Hreflang Tags
For standard HTML pages, hreflang annotations can be placed inside the <head> section.
For example:
<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="fr-fr" href="https://example.com/fr/page/" />
Each localized version should reference the other relevant versions.
2. Use XML Sitemaps
Large websites may prefer implementing hreflang through XML sitemaps. This can be particularly useful when managing thousands of international URLs.
An XML sitemap can associate multiple language or regional URLs with the same content group.
This approach can centralize hreflang information and reduce the need to add large numbers of HTML annotations to individual pages.
3. Use HTTP Headers
HTTP headers provide another implementation method, particularly for non-HTML resources such as PDFs.
This approach is less common for ordinary webpages but can be useful in specific technical environments.
The most important rule is to choose an implementation method that fits your website architecture and maintain it consistently.
Use the Correct Language and Region Codes
One of the most common hreflang mistakes is using incorrect values.
Hreflang language codes generally use ISO 639-1 language codes, while regional identifiers use ISO 3166-1 alpha-2 country codes.
For example:
-
en= English -
fr= French -
de= German -
es= Spanish -
en-us= English for the United States -
en-gb= English for the United Kingdom -
fr-fr= French for France -
de-de= German for Germany
The language comes first, followed by the region.
Do not assume that a country code alone represents a language. us is not an appropriate hreflang value for an English United States page. en-us provides both language and regional information.
Always Include Return References
Hreflang works best when alternate versions reference one another.
Suppose your US page references your UK page:
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
The UK page should also reference the US version:
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
These reciprocal references help search engines understand that the URLs belong to the same international page group.
If you have five localized versions, each relevant version should generally include the appropriate references to the others.
Include a Self-Referential Hreflang Tag
Each localized page should also identify itself.
For example, the US page could contain:
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
alongside its references to other versions.
This creates a complete set of annotations and makes the relationship between the URLs clearer.
Use x-default for Users Without a Specific Regional Version
The x-default hreflang value can be used for users who do not match one of your specified language or regional versions.
For example:
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
This can be useful when your website has a general international landing page or a language-selection page.
It provides a fallback URL rather than targeting a particular language or country.
Keep Canonical Tags and Hreflang Consistent
Canonicalization and hreflang should work together.
Each localized page should generally have a canonical URL that points to itself rather than automatically canonicalizing every international version to one master page.
For example:
US page:
<link rel="canonical" href="https://example.com/us/" />
UK page:
<link rel="canonical" href="https://example.com/uk/" />
The hreflang annotations then establish the relationship between these separate URLs.
This distinction is important because canonical tags identify the preferred version of substantially similar content, while hreflang identifies alternative versions intended for different audiences.
Common Hreflang SEO Mistakes
Even well-structured international websites can encounter hreflang problems.
Common mistakes include:
-
Using invalid language or country codes
-
Forgetting self-referencing hreflang tags
-
Missing reciprocal references
-
Linking to URLs that redirect
-
Using URLs that return errors
-
Mixing HTTP and HTTPS versions
-
Referencing non-canonical URLs
-
Creating incomplete hreflang groups
-
Using hreflang on pages that do not have genuine international equivalents
-
Forgetting to update hreflang after changing URLs
For large websites, manually checking these relationships can become difficult. Automated crawling and technical SEO audits can help identify broken or inconsistent annotations.
How to Build a Scalable Hreflang Strategy
Before implementing hreflang across an international website, create a URL mapping spreadsheet.
Map each equivalent page against its language and regional versions.
For example:
| Content | US | UK | France | Germany |
|---|---|---|---|---|
| Homepage | /us/ | /uk/ | /fr/ | /de/ |
| Product A | /us/product-a/ | /uk/product-a/ | /fr/product-a/ | /de/product-a/ |
| Product B | /us/product-b/ | /uk/product-b/ | /fr/product-b/ | /de/product-b/ |
This makes it easier to identify missing translations, incorrect URLs, and incomplete relationships before deploying hreflang.
For large international websites, consider generating hreflang annotations automatically from your CMS or URL database rather than maintaining thousands of tags manually.
How to Check Your Hreflang Implementation
After implementation, regularly audit your hreflang setup.
Check whether:
-
Every URL returns a successful status code.
-
Hreflang values use valid language and region codes.
-
URLs reference the correct localized alternatives.
-
Return references exist.
-
Self-referencing annotations are present.
-
Canonical URLs are consistent.
-
Redirected or broken URLs have not been included.
-
New international pages are added to the appropriate hreflang groups.
Regular technical SEO audits are especially important when international websites frequently add, remove, or restructure content.
Final Thoughts
A successful hreflang SEO strategy is ultimately about giving search engines clear information about your international content structure. Hreflang tags connect equivalent pages across languages and regions, helping search engines understand which version is intended for different audiences.
The key is consistency. Use valid language and regional codes, create reciprocal references, include self-referencing annotations, keep canonical URLs aligned with your localization strategy, and regularly audit the implementation.
For multilingual and international websites, properly implemented hreflang can become an important part of a broader international SEO strategy. When combined with strong localized content, technical SEO, and a well-organized site architecture, it gives search engines much clearer signals about which pages should reach which audiences.