Home / Blog / Tips
Tips

Hreflang Tags: How to Implement Them for Multilingual SEO

Hreflang tells Google which language version of a page to show. Learn the syntax, the three implementation methods, the rules that make it work and the most common hreflang mistakes.

WordBeam Team
Oct 07, 2026 · 5 min read
Hreflang Tags: How to Implement Them for Multilingual SEO

Hreflang is an HTML attribute that tells search engines which language and, optionally, which region a page is written for, and which alternate versions of that page exist in other languages. It helps Google show the right language version to each user, for example the German page to searchers in Germany and the English page to searchers in the US. This guide explains how hreflang works, the three ways to implement it, the most common mistakes and how to check your setup.

What Does Hreflang Do?

When you translate a website, you create several pages with the same purpose in different languages. Without hreflang, search engines may show the wrong version, or treat similar regional pages, such as English for the US and English for the UK, as duplicates. Hreflang connects these versions into one group and signals which one is meant for which audience. Google explains the details in its official guide to localized versions of your pages.

Hreflang is a signal, not a directive. Google uses it as a strong hint, but it can still choose a different page if other signals conflict. Correct implementation makes the hint much more reliable.

Hreflang Syntax

A basic hreflang tag in the <head> of a page looks like this:

<link rel="alternate" hreflang="de-DE" href="https://example.com/de/" />

  • Language code: ISO 639-1 format, for example en, de, fr.
  • Optional region code: ISO 3166-1 Alpha 2 format, for example en-GB or es-MX. A region code alone is not valid.
  • x-default: a special value for the fallback page shown when no other version matches, often a language selector or the main English page.

Three Ways to Implement Hreflang

Method How it works Best for
HTML link tags Add <link rel="alternate" hreflang> elements to the head of every page Most websites and CMSs
HTTP headers Send hreflang in the Link header of the server response PDFs and other non-HTML files
XML sitemap List every URL with its alternates using xhtml:link elements Large sites where editing page templates is difficult

Use one method consistently. Mixing methods makes errors harder to find.

Hreflang Rules You Must Follow

  1. Self-reference. Every page must list itself as well as all its alternates.
  2. Return links. If page A points to page B, page B must point back to page A. Missing return links are the most common reason hreflang is ignored.
  3. Absolute URLs. Always use full URLs including the protocol.
  4. Indexable targets. Every URL in the group should return status 200, be indexable and point to itself as canonical.
  5. Correct codes. Use en-GB, not en-UK, and do not use region codes on their own.
  6. Same content intent. Alternates should be real translations or regional versions, not unrelated pages.

Common Hreflang Mistakes

  • Pointing hreflang to redirected, noindex or canonicalized pages.
  • Forgetting the x-default value on sites with a language selector.
  • Using hreflang on pages that were never translated, so the "German" page is still in English.
  • Updating one language version and forgetting the others when URLs change.
  • Relying on automatic redirects by IP address, which can stop Google from crawling every version.

How to Check Your Hreflang Setup

Run a crawl with an SEO audit tool that reports hreflang errors, use the URL Inspection and Page indexing reports in Google Search Console to confirm every version is indexed, and spot-check a few page groups by viewing the source. Pay special attention to missing return links and non-200 URLs.

Hreflang Is Only Half the Job

Hreflang tells Google which page to show, but the page still has to deserve the ranking. That means fully translated content, localized titles and meta descriptions, and keywords researched in each language. Read our guides to SEO translation and localization SEO, and plan the whole structure with our multilingual website guide.

Translate Every Language Version With WordBeam

WordBeam helps teams keep all language versions of a website complete and in sync. Export content from your CMS as XLIFF, JSON, CSV or XLSX, translate it with translation memory, a keyword-aware glossary and AI engines such as DeepL, GPT and Claude, and import it back ready to publish. A translation management system makes it easy to see which pages are still missing a translation before you add hreflang. Try it free for 14 days with 10,000 words on the WordBeam pricing page.

Frequently Asked Questions

Is hreflang a ranking factor?

No. Hreflang does not boost rankings directly. It helps search engines show the correct language version of a page that already ranks.

Do I need hreflang if my site has only one language?

No. Hreflang is only needed when you have two or more language or regional versions of the same content.

What is x-default in hreflang?

x-default marks the fallback page for users whose language or region does not match any listed version, such as a global homepage or language selector.

Does Bing support hreflang?

Bing relies mainly on other signals such as the content-language meta tag and the page language. Using both hreflang and a correct lang attribute is a safe approach.