Skip to content
Anand Bajrangi SEO consultant and author Get free SEO audit

Hreflang Tags for SEO: Implementation, Examples & Common Errors (2026)

Hreflang Explained

Hreflang is an HTML attribute and link annotation that helps Google understand which language or regional versions of a page are alternatives to one another. It is useful when a website has separate URLs for different languages or for regional audiences that share a language, such as English pages for the US, UK, and Australia.

Hreflang does not translate a page, guarantee rankings, or force Google to show a particular URL. It is a signal that helps search engines choose a suitable version for users. The pages still need useful localized content, crawlable URLs, and a consistent technical setup.

What Is Hreflang?

Hreflang uses values that combine a language code and, optionally, a region code. For example:

  • en — English
  • en-US — English for the United States
  • en-GB — English for the United Kingdom
  • fr-CA — French for Canada
  • de — German

The language code uses the ISO 639-1 standard. The optional region code uses ISO 3166-1 Alpha 2. A country code alone, such as US, is not a valid hreflang value because the language code must come first.

When Should You Use Hreflang?

Use hreflang when you have multiple versions of substantially the same page for different languages or regional audiences.

  • A website with English and French versions.
  • A store with separate US and UK English product pages, including differences in currency, shipping, or availability.
  • A service business with localized pages for different countries where the main language is shared.
  • A publisher offering translated versions of the same article.

You usually do not need hreflang for a website that has only one language and one audience. Do not create regional pages with nearly identical content just to add country codes. Each version should genuinely serve its audience.

How Hreflang Works

Hreflang annotations tell search engines that certain URLs are alternate versions of the same content. Google can then use language and region signals to select a more appropriate result for a searcher.

For example, a page might have these versions:

  • https://example.com/en-us/product/
  • https://example.com/en-gb/product/
  • https://example.com/fr-fr/product/

Each version should identify itself and the other relevant alternatives. The references should be reciprocal: if the US page points to the UK page, the UK page should point back to the US page.

Hreflang Implementation Methods

Google supports three ways to communicate alternate language or regional versions. Choose the method that best fits your site and keep it consistent.

1. HTML link elements

Add alternate link elements in the head section of each page. Example:

<link rel="alternate" hreflang="en-US"
 href="https://example.com/en-us/page/" />
<link rel="alternate" hreflang="en-GB"
 href="https://example.com/en-gb/page/" />
<link rel="alternate" hreflang="fr-FR"
 href="https://example.com/fr-fr/page/" />
<link rel="alternate" hreflang="x-default"
 href="https://example.com/language-selector/" />

Include the full set of relevant alternate references on every version, including a reference to itself. Use fully qualified URLs with the correct protocol.

2. XML sitemap annotations

You can list alternate language versions in an XML sitemap using the xhtml:link element. This can be useful for large sites where managing many tags in page HTML is difficult. Follow Google’s sitemap syntax carefully and include reciprocal references.

3. HTTP headers

HTTP Link headers can identify alternate versions of non-HTML files, such as PDFs. This is useful when you cannot add HTML head elements to the resource.

Google treats these methods as equivalent. Implementing all three usually adds maintenance work without providing a search advantage. Pick one primary method unless your platform has a specific reason to use more.

What Is x-default?

The x-default value identifies a fallback URL for users whose language or region does not match any listed alternative. It is often used for a language or country selector page.

<link rel="alternate" hreflang="x-default"
 href="https://example.com/language-selector/" />

You can use a suitable default-language page as the fallback when that is the best experience. The value is optional, but useful when your site has a selector or several regional variants.

Hreflang and Canonical Tags

Canonical and hreflang have different jobs. A canonical tag identifies the preferred URL among duplicate or very similar pages. Hreflang identifies alternate language or regional versions that should be available to different audiences.

For genuinely localized pages, each version generally uses a self-referencing canonical and lists its alternate versions with hreflang. Do not canonicalize every regional page to one language version if you want the localized pages to be eligible for search.

Common Hreflang Mistakes

Mistake Why it is a problem How to fix it
Missing return links Alternate references are not reciprocal Make each version list the relevant alternatives, including itself
Invalid language or region codes Search engines may ignore incorrect values Use valid ISO language and region codes
Relative URLs Alternate destinations may be ambiguous Use fully qualified URLs with HTTPS where appropriate
Broken or redirected alternate URLs References point to unavailable or non-canonical destinations Link directly to working canonical pages
Wrong canonical setup Canonical signals conflict with localized versions Use self-referencing canonicals for distinct localized pages
Hreflang on unrelated pages Pages are not true alternatives Only connect pages that serve the same content or intent for different locales
Automatic language redirects Users and crawlers may be prevented from accessing all versions Offer a visible language selector rather than forcing a redirect based on IP or browser settings

How to Audit Hreflang

  1. List every language and regional URL version of each page.
  2. Check that each page includes itself and all relevant alternate versions.
  3. Verify reciprocal references between alternate pages.
  4. Validate language and region codes.
  5. Confirm every alternate URL returns a successful response and is indexable.
  6. Check that canonical tags do not conflict with the intended localized pages.
  7. Review the rendered HTML or sitemap output, not only the CMS settings.
  8. Re-crawl after changes and monitor indexing and search performance by locale.

Hreflang for WordPress Websites

WordPress multilingual plugins can generate hreflang annotations when language relationships are configured correctly. The exact setup depends on the plugin and URL structure. Before launch, check that:

  • Each language version has a stable, separate URL.
  • The plugin connects the correct translations or regional alternatives.
  • Hreflang references are reciprocal and include the current page.
  • Canonical tags point to the correct localized URL.
  • Language switcher links are visible and usable.
  • Only published, accessible language versions are referenced.

Do not manually add a second set of hreflang tags if your plugin already outputs them. Duplicate or conflicting annotations can make troubleshooting harder.

Frequently Asked Questions

Does hreflang improve rankings?

Hreflang is primarily a localization signal, not a direct ranking boost. It helps Google understand alternate versions and may help show a more suitable page to the user.

Is hreflang a Google ranking factor?

It is not a conventional ranking factor that makes a page rank higher. It helps search engines interpret language and regional alternatives.

Do I need hreflang for US and UK English pages?

It can be useful when the pages have meaningful regional differences, such as spelling, pricing, shipping, legal information, or product availability. If the pages are identical and do not serve distinct audiences, first consider whether separate URLs are needed.

Can I use hreflang without translating the whole page?

Regional versions can share a language while adapting useful details for their audiences. However, changing only a few template words while the main content remains the same may not create a meaningful localized experience.

Should hreflang URLs be canonical?

Each distinct localized page should generally have a self-referencing canonical. Hreflang then connects it to the other alternate versions.

Does hreflang guarantee Google will show the right page?

No. Hreflang is a signal. Google considers several signals and may choose a different URL based on the search and user context.

Final Thoughts

Hreflang helps international websites connect language and regional page versions so search engines can choose a suitable result for different users. Correct implementation depends on valid codes, fully qualified URLs, reciprocal references, and a consistent canonical strategy.

Start by creating genuinely useful localized pages and stable URLs. Then implement one hreflang method, audit the relationships, and give visitors a clear way to switch languages or regions. Good localization is more than a tag: it is a complete experience that matches the needs of each audience.

Official Resources

Share this article

LinkedIn X WhatsApp Email

Written by

Anand Bajrangi

Anand is a self-taught SEO consultant from Bihar, India, and the author of The Truth About SEO. He taught himself SEO in 2020, and he and his team have since helped more than 100 businesses get found on Google.

Want Anand to look at your site?

Request a free SEO audit. You get a plain-English list of what to fix first, by email.

Get free SEO audit