What Is Hreflang? A Complete Guide

What hreflang is, why it matters for international SEO, and how search engines use it to serve the right language version of your page.

Hreflang is an HTML attribute that tells search engines which language and region a page is intended for -- and which alternate versions of that page exist for other languages or regions.

It was introduced by Google in 2011 to solve a specific problem: when you have the same content in multiple languages, Google needs to know which version to show to which user. Without hreflang, it guesses. With it, you're telling Google directly.

Why hreflang exists

Imagine you run an e-commerce site with English, French, and German versions. A user in France searches for your product. Google might show them the English page -- the one with the most backlinks -- even though the French version exists and is far more useful to that user.

Hreflang fixes this. It creates a map of your language/region variants so Google can serve the right one.

It also helps with duplicate content across languages. If your English-US and English-UK pages are nearly identical, hreflang signals that they're intentional variants, not accidental duplicates.

The syntax

Hreflang uses a link element with rel="alternate" and an hreflang attribute containing an ISO language code:

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

You can also target specific regions by combining language and country codes:

<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
<link rel="alternate" hreflang="es-mx" href="https://example.com/mx/" />

Every page in your hreflang set must include the full set of links -- including a link to itself.

Three ways to implement it

You're not limited to HTML link elements. Hreflang can be implemented via:

  • HTML <head> -- the most common method, works for any HTML page
  • HTTP headers -- used for non-HTML content like PDFs
  • XML sitemaps -- useful for large sites where editing every page's HTML is impractical

All three are supported by Google and Bing.

Generate hreflang tags automatically

Stop writing hreflang by hand. Generate correct tags for every language variant in seconds.

What problems it solves

Wrong version in search results -- Users landing on the wrong language version is the most visible symptom hreflang addresses. French speakers getting English pages, or US pricing pages showing to UK users.

Cannibalization between language variants -- Without hreflang, your English-US and English-GB pages compete against each other in search. Hreflang groups them so Google understands they serve different audiences.

Unnecessary duplicate content concerns -- Translated pages with identical metadata or structure can look like thin content to crawlers. Hreflang provides context that these are intentional regional variants.

It's a signal, not a directive

This is important: hreflang is a strong hint, not an absolute instruction. Google will consider it alongside other signals -- user location, browser language settings, past behavior -- and may not always follow it exactly.

Think of it the same way you think of the canonical tag. You're expressing intent. Google respects it most of the time, but it's not a guarantee.

That also means errors in your hreflang implementation don't always cause obvious breakage -- which is why so many sites have broken hreflang that goes unnoticed for months.

Does Bing support hreflang?

Yes, but with caveats. Bing supports hreflang for language targeting but doesn't use it for region targeting the same way Google does. For most multilingual SEO purposes, focusing on Google's implementation requirements covers the majority of cases.

Is hreflang required?

No. If your site serves a single language to a single region, you don't need it. But if you have content in multiple languages or target multiple countries with the same language, hreflang is the standard way to communicate that structure to search engines -- and the cost of not using it is poor language targeting in search results.


Part of Boring Tools -- boring tools for boring jobs.

Generate perfect hreflang tags

Create and validate hreflang markup for your multilingual site. Free.