Reaching customers in different countries can help a business expand its online presence. However, international SEO requires more than translating website content or creating separate country pages. Search engines also need clear signals to understand which version of a page is relevant to users in different languages and regions.
This is where hreflang tags become useful.
Hreflang is an HTML attribute that helps Google understand the intended language or regional audience of alternative versions of a webpage. For example, a business might have one page for English-speaking users in the United Kingdom and another for English-speaking users in the United States. Although the pages may cover similar topics, their spelling, pricing, delivery details, or offers could differ.
Correct hreflang implementation helps search engines understand the relationship between these pages and select an appropriate version for users.
This guide explains how hreflang works, when to use it, how to implement it, and how to troubleshoot common mistakes.
What Are Hreflang Tags?
Hreflang tags are signals that identify the language and, when necessary, the regional audience of a webpage.
They are particularly useful for websites that publish multiple versions of the same or similar content for different markets.
Consider an online store that operates in three markets:
- United Kingdom: English content with prices in pounds.
- United States: English content with prices in US dollars.
- France: French content with prices in euros.
Without clear signals, search engines may find it harder to understand which regional page should appear for a particular audience. Hreflang helps describe the relationship between these alternatives.
A typical hreflang annotation looks like this:
<link rel="alternate" hreflang="en-gb"
href="https://example.com/uk/" />
<link rel="alternate" hreflang="en-us"
href="https://example.com/us/" />
<link rel="alternate" hreflang="fr-fr"
href="https://example.com/fr/" />
These annotations identify the UK English, US English, and French regional versions of a page.
The example uses placeholder URLs. A real website should replace them with the correct, accessible URLs for its own pages.
Hreflang is a signal rather than a guarantee. It does not automatically improve rankings, ensure indexing, or force Google to display a particular URL.
Why Hreflang Matters for International SEO
1. It Helps Search Engines Understand Regional Alternatives
Two pages can be similar while serving different audiences. A product page for the UK may include local shipping information, while the US version may display different prices and delivery policies.
Hreflang helps search engines recognize these pages as alternatives intended for different language or regional audiences.
2. It Supports a Better User Experience
Visitors should ideally land on a page that matches their language and market.
Showing a user the correct regional version can make it easier to understand product information, payment options, shipping conditions, and customer support details.
A relevant landing page can also reduce confusion when a business operates across several countries.
3. It Helps Manage Multilingual Websites
A multilingual website may contain hundreds or thousands of translated pages. Hreflang provides a structured way to connect the language versions of each page.
This is especially important when product categories, service pages, articles, and landing pages exist in multiple languages.
4. It Clarifies the Relationship Between Similar Pages
Regional pages may contain much of the same information. Hreflang helps explain that these pages are designed for different audiences rather than being unrelated copies.
However, hreflang is not a replacement for canonical tags, high-quality localization, or a clear website structure. Each element serves a different purpose.
How to Choose the Correct Hreflang Code
Hreflang values generally use a language code and may include a regional code.
For example:
Hreflang codeIntended audience
en English-language users
en-gb English-language users in the United Kingdom
en-us English-language users in the United States
fr French-language users
fr-ca French-language users in Canada
de-de German-language users in Germany
es-mx Spanish-language users in Mexico
Language codes follow ISO 639-1, while regional codes use ISO 3166-1 Alpha 2.
Use a language-only code when a page targets speakers of a language broadly. Add a regional code when the content is intended for a specific country or region.
For example, en-gb is appropriate for a UK-specific English page. The code uk-en is not the correct order for this purpose.
Avoid inventing codes or using country codes alone when the hreflang value is meant to identify a language. Validate the codes before deploying them across a large website.
How to Implement Hreflang Tags
There are three main methods for implementing hreflang: HTML link elements, XML sitemaps, and HTTP headers.
Most websites can use HTML annotations or an XML sitemap, depending on their platform and scale.
Step 1: Identify Your Language and Regional Pages
Start by listing every page that has an equivalent version for another language or region.
For example:
- /uk/services/seo/
- /us/services/seo/
- /fr/services/seo/
Each URL should provide meaningful content for its intended audience.
Do not create hreflang relationships simply because two pages share a keyword or belong to the same category. They should be genuine alternatives, not unrelated pages.
If a page has no equivalent in another language or region, it does not need to be included in a group of alternatives.
Step 2: Use Absolute URLs
Hreflang annotations should use complete, absolute URLs, including the protocol and domain.
Correct:
<link rel="alternate" hreflang="en-gb"
href="https://example.com/uk/services/" />
Avoid relative paths such as /uk/services/ in the annotation.
Also make sure the destination URL is the preferred, canonical version of the page. Avoid pointing hreflang tags to URLs that redirect, return errors, or are blocked from crawling.
Step 3: Add Reciprocal Hreflang Annotations
Hreflang annotations should work in both directions.
If the UK page identifies the US page as an alternative, the US page should also identify the UK page. Each page in the group should include the relevant alternative URLs, including a reference to itself.
For example, the UK page might contain:
<link rel="alternate" hreflang="en-gb"
href="https://example.com/uk/" />
<link rel="alternate" hreflang="en-us"
href="https://example.com/us/" />
The US page should contain the corresponding annotations as well.
Missing reciprocal references can cause search engines to ignore some of the annotations. This is one of the most common problems on multilingual websites.
Step 4: Add Hreflang to the HTML Head
For HTML-based websites, hreflang link elements are usually placed inside the document's <head> section.
A page targeting the UK, US, and France could use the following pattern:
<head>
<link rel="alternate" hreflang="en-gb"
href="https://example.com/uk/" />
<link rel="alternate" hreflang="en-us"
href="https://example.com/us/" />
<link rel="alternate" hreflang="fr-fr"
href="https://example.com/fr/" />
</head>
Apply the appropriate annotations consistently to every relevant page in the group.
For larger websites, manually maintaining thousands of tags can become difficult. A content management system, localization plugin, or automated template may help, provided it generates accurate and consistent URLs.
Step 5: Consider Using x-default
The x-default value can identify a default page for users whose language or regional preferences do not match any specifically listed alternative.
It is often useful for an international homepage or a language-selection page.
For example:
<link rel="alternate" hreflang="x-default"
href="https://example.com/" />
This is optional. Use it when a default destination genuinely makes sense for the website, rather than adding it without a clear purpose.
Step 6: Keep Canonical Tags Consistent
Canonical tags and hreflang annotations serve different functions.
A canonical tag indicates the preferred URL among duplicate or very similar pages. Hreflang identifies language or regional alternatives.
If regional pages are intended to be independently available in search results, each page will commonly have a self-referencing canonical URL. Hreflang can then connect the alternatives.
For example, the UK page should generally use its own canonical URL, while the US page should use its own canonical URL.
Pointing every regional page's canonical tag to a single country page can undermine the intended setup. Review canonical signals before deploying hreflang across the site.
Using XML Sitemaps for Hreflang
An XML sitemap is an alternative to placing hreflang annotations in every page's HTML.
This approach can be useful for large websites with many localized URLs, especially when sitemap generation is already automated.
Each URL entry includes its alternate language versions using the xhtml:link element. The sitemap must declare the relevant namespace, and each alternative should be represented consistently.
A simplified example is shown below:
<url>
<loc>https://example.com/uk/</loc>
<xhtml:link rel="alternate"
hreflang="en-gb"
href="https://example.com/uk/" />
<xhtml:link rel="alternate"
hreflang="en-us"
href="https://example.com/us/" />
</url>
This snippet illustrates the structure, not a complete sitemap. A production implementation should include all relevant alternatives and the required XML namespace declarations.
The key is consistency. Do not maintain conflicting hreflang relationships across the HTML, sitemap, and HTTP headers. Choose a method that your team can manage accurately and keep it updated when URLs change.
Common Hreflang Mistakes to Avoid
Even when the basic tags look correct, implementation errors can prevent search engines from using them effectively.
Incorrect Language or Regional Codes
A small mistake in a code can change the intended audience or make the annotation invalid. Use supported language and region values instead of creating custom combinations.
Missing Return Links
If one page points to another but the other page does not acknowledge the relationship, the hreflang cluster is incomplete. Check the relationship from both sides.
Redirecting or Broken Alternate URLs
An alternate URL should point to the intended final page. Redirects, 404 errors, and inaccessible destinations can weaken the implementation.
Inconsistent Canonical Tags
If a page declares one URL as canonical but uses another URL in its hreflang annotations, search engines may receive conflicting signals. Keep these elements aligned.
Using Hreflang on Unrelated Pages
Hreflang is intended for alternate versions of content, not for linking every page on a site to its equivalent category or homepage. Connect pages only when they genuinely serve the same purpose for different audiences.
Forgetting to Update Tags After a Migration
Changing domains, URL structures, or language folders can break existing annotations. Include hreflang updates in the migration checklist and verify the relationships after launch.
Assuming Translation Alone Is Enough
A translated page may still be a poor match for its intended market if it contains incorrect prices, shipping information, legal details, or local terminology.
Hreflang helps identify the intended audience, but the page itself must also be useful and accurate for that audience.
How to Audit Hreflang Implementation
A regular audit helps catch errors before they affect a large number of URLs.
1. Crawl the Website
Use an SEO crawler to collect hreflang annotations, status codes, canonical URLs, and indexability information.
Check whether the intended alternate pages are present and whether any URLs redirect or return errors.
2. Check Reciprocal Relationships
Review each language or regional cluster to confirm that the alternate pages reference one another correctly.
For large websites, use a spreadsheet or automated crawl report to identify missing return links and inconsistent sets of alternatives.
3. Validate Canonical URLs
Confirm that each regional page points to the correct canonical URL. Look for cases where hreflang references a URL that canonicalizes to a different page.
4. Review Google Search Console
Use Google Search Console to examine indexing, page availability, and performance for the relevant URL groups. Compare the pages receiving impressions with the markets they are intended to serve.
Search Console may help identify broader indexing or performance issues, but it does not provide a complete, dedicated report for every hreflang relationship.
5. Test After Every Major Change
Repeat the audit after a website migration, redesign, CMS update, new language launch, or change to the URL structure.
Automation can help detect broken relationships early, but human review is still important for checking whether the selected pages and language codes make sense.
For official implementation guidance, review Google's documentation on managing multilingual and multiregional sites.
How Hreflang Fits Into a Broader International SEO Strategy
Hreflang is one part of international SEO, not a complete strategy by itself.
A strong setup should also include:
- A clear URL structure: Choose a suitable approach, such as country-specific domains, subdomains, or language and country folders.
- Localized content: Adapt wording, currency, measurements, offers, and business information to the target audience.
- Crawlable internal links: Help search engines discover regional pages through accessible navigation and links.
- Consistent technical signals: Align canonical tags, XML sitemaps, redirects, and hreflang annotations.
- Relevant keyword research: Research the language and search behavior of each target market instead of translating keywords word for word.
- Performance monitoring: Track organic traffic, impressions, clicks, and conversions by country and landing page.
A company expanding into a new market should also check whether it has enough useful, locally relevant content to justify creating a separate version. Multiple regional pages are not automatically beneficial if they provide little value beyond changing the country name.
Final Thoughts
Hreflang tags help search engines understand which language or regional version of a webpage is intended for a particular audience. When implemented correctly, they support a more coherent international SEO structure and help users find content that better matches their needs.
The most important steps are to select valid language and regional codes, use absolute URLs, maintain reciprocal annotations, keep canonical signals consistent, and audit the setup whenever the website changes.
Businesses should also remember that hreflang does not replace useful content, sound technical SEO, or market-specific research. It works best as part of a broader international SEO strategy built around clear signals and a good user experience.
Frequently Asked Questions
1. Do hreflang tags directly improve Google rankings?
Hreflang is not a direct ranking boost. It helps Google understand the intended language or regional audience of alternate pages, which can support the selection of an appropriate version in search results.
2. Should every page have a hreflang tag?
No. Hreflang is most useful when a page has genuine alternate versions for other languages or regions. Pages without relevant alternatives do not need to be forced into a hreflang group.
3. Can I use hreflang and canonical tags together?
Yes. They serve different purposes. Hreflang connects alternate language or regional pages, while canonical tags identify a preferred URL among duplicate or very similar pages. Their signals should be consistent.
4. How often should I audit hreflang tags?
Audit them after major changes such as migrations, URL updates, redesigns, or new language launches. For large international websites, automated recurring crawls can help identify broken or inconsistent annotations.