Hreflang Explained

You've built a site with a US page and a UK page, or an English version and a Spanish version of the same product page. Then you notice something odd in Search Console: Google is showing your Spanish page to searchers in Madrid, but also occasionally to searchers in Mexico City who'd be better served by a page with Mexican pricing and spelling. Or worse, your US and UK pages are quietly competing with each other, and Google is only ever showing one.

This isn't a content problem. It's a signal problem — Google has no way to know these pages are intentional, region-specific counterparts of each other unless you tell it. That signal has a name, and it's simpler to implement correctly than most explanations make it sound.

Quick Answer

Hreflang is an HTML attribute that tells search engines which language and region a page is written for, so the right localized version of a page can be shown to the right searcher. It's added as link tags in the page head, an HTTP header, or an XML sitemap, and every page in a set must link back to every other page, including itself, for it to be considered valid.

What is hreflang?

Hreflang is an annotation, most often written as a <link> tag, that pairs a page's URL with a language and, optionally, a region code. It exists to solve one specific problem: when the same content is published in multiple languages or for multiple countries, search engines need a way to know those pages are alternates of each other rather than duplicate or unrelated content.

Put simply: hreflang isn't a tag you add to one page. It's a relationship you declare across a whole cluster of pages at once.

Why hreflang matters

Skipping hreflang on a multilingual or multi-region site has consequences that are easy to miss until they show up in traffic data:

📊 Quick stat The single most common reason Google Search Console flags an "Alternate page with proper canonical tag" or missing-return-tag warning on international sites isn't a wrong language code — it's one page in the cluster that simply forgot to link back to the others.

Step-by-step: implementing hreflang

  1. Map out your page groups. List every set of pages that are the same content in different languages or for different regions — this is the cluster hreflang will connect.
  2. Choose an implementation method. Decide between HTML link tags in the page head, an HTTP header (useful for PDFs or non-HTML files), or entries in your XML sitemap.
  3. Assign the correct codes. Use the ISO 639-1 language code alone for language-only targeting, or add the ISO 3166-1 country code when a page is region-specific, such as de versus de-AT.
  4. Add a full set of tags to every page. Each page in the cluster needs a complete list of alternates, including a self-referencing tag pointing to itself.
  5. Include an x-default entry. Point it to a sensible fallback, such as a language-selector page or your primary international version.
  6. Use absolute, canonical URLs. Every href value should be the full URL, including protocol, and should match the canonical version of that page exactly.
  7. Validate before and after publishing. Check the tags with a hreflang validator, then confirm in Google Search Console's International Targeting report that no return-tag errors appear.
Try the Rebrixe Hreflang Generator — free Add your page groups and language codes, get complete, return-tag-safe hreflang markup.
Generate Hreflang Tags →

Common mistakes that break hreflang

1. Missing return tags

If Page A lists Page B as an alternate but Page B doesn't list Page A back, search engines treat the whole annotation for that pair as untrustworthy and typically ignore it entirely.

2. Using the wrong or reversed code format

The format is always language-COUNTRY, such as en-US, never US-en or a country code used alone — a country isn't a substitute for a language in this syntax.

3. Conflicting with the canonical tag

Pointing a page's canonical tag at a different-language version while also hreflang-linking to it sends a contradictory signal — the canonical should point to itself when hreflang is being used to manage translated variants.

4. Using relative URLs

Hreflang href values need to be complete, absolute URLs with the protocol included; relative paths are a frequent cause of validator errors and silently ignored tags.

5. Forgetting to update the cluster when a page is added

Launching a new regional version means every existing page in that cluster needs its hreflang list updated to include the new page — otherwise the new version won't be linked back to properly.

💡 Pro tip Keep a single source-of-truth spreadsheet mapping every URL to its language and region code, so any hreflang cluster can be regenerated in full whenever a page is added, moved, or removed.

Real-world examples

How hreflang plays out for different kinds of multilingual and multi-region sites:

Global ecommerce store
Region-specific pricing pages
en-US / en-GB / en-AU
Same product copy, different currency and shipping details, linked so each country sees its own version in search.
SaaS company
Translated marketing pages
en / de / fr / ja
Fully translated landing pages linked as language alternates, with x-default pointing to the English version.
Multilingual blog
Per-post language pairs
Sitemap-based
Hreflang declared in the XML sitemap instead of page templates, since posts are added faster than templates get edited.
News publisher
Regional editions
en-IN / en-US / en-GB
Same English-language story, three regional editions, hreflang prevents the editions from cannibalizing each other's rankings.

The pattern across all four: hreflang isn't compensating for a translation problem, it's managing a routing problem — getting an already-correct page in front of the right person.

Hreflang implementation methods compared

Three valid ways to declare hreflang, and where each one is the more practical choice.

Method Setup effort Best for Watch out for
HTML link tags Moderate, per page Small to mid-size sites with templated pages Return tags must be kept in sync across every page
XML sitemap Low, centralized Large sites, frequently added content, blogs Sitemap must be regenerated whenever pages change
HTTP header High, server-level Non-HTML files like PDFs Requires server or CDN configuration access

Generate your hreflang tags right now — free

The Rebrixe Hreflang Generator builds a complete, return-tag-safe set of hreflang link tags for every page in your cluster, including x-default. No account, no watermark — enter your URLs and language codes, and copy the finished markup.

Free Hreflang Tag Generator Add your pages and codes, copy the complete tag set.
Open Hreflang Generator →

Frequently asked questions

Hreflang tells search engines that several pages are translated or localized versions of the same content, so the correct version can be shown to a searcher based on their language and region instead of Google guessing.
No. Hreflang only matters when the same content exists in more than one language or in region-specific versions, such as English for the US and English for the UK. A single-language, single-region site has nothing for hreflang to disambiguate.
x-default marks the fallback page to show visitors whose language or region doesn't match any of the specific hreflang entries, typically a language-selector page or a default global version of the site.
Hreflang is only valid when every page in a set points back to every other page, including itself. If Page A links to Page B but Page B doesn't link back to Page A, Google treats the whole annotation as unreliable and may ignore it.
Yes. Hreflang can also be declared in an XML sitemap or in the HTTP header of a response, which is useful for non-HTML files or for sites where editing page templates individually isn't practical.
Hreflang is not a ranking factor by itself. What it changes is which version of a page gets shown to which searcher, which improves relevance and click-through rate rather than boosting a page's position for everyone.
Hreflang uses ISO 639-1 two-letter language codes, optionally combined with an ISO 3166-1 Alpha-2 country code, written as language-COUNTRY, such as en-GB for English in the United Kingdom or fr-CA for French in Canada.
Google Search Console's International Targeting report flags missing return tags and invalid codes, and third-party hreflang validator tools can crawl a full set of URLs at once to confirm every page links back correctly.

Generate your hreflang tags in seconds

The Rebrixe Hreflang Generator builds a complete, return-tag-safe set of hreflang markup — no account, no watermark, just a ready-to-paste tag set for every page in your cluster.

Launch the Hreflang Generator →
← Back to blogs