A SaaS team launches a UK site, copies the US pages, swaps dollars for pounds and waits. Three months later the UK pages are missing from Google. Search Console lists them as "Duplicate, Google chose different canonical than user", and British buyers are still landing on US pricing.
The fix most teams reach for is hreflang, the attribute that tells search engines which language or regional version of a page to show. Most guides sell it as protection against a duplicate content penalty. That framing is wrong in a way that matters: translated pages are not duplicates, there is no penalty, and the pages that are genuinely at risk are the ones written in the same language for different countries.
This guide explains what hreflang does and does not do, gives a copy-paste tag set for a real four-locale example, and lists the seven errors that quietly break it.
What Is hreflang?
hreflang is an attribute on a link element that tells search engines a page has alternate versions for other languages or regions, and which version suits which audience. Google uses it to swap the right URL into each searcher's results; it does not change rankings on its own.
Each version of a page carries a set of annotations, one for every version including itself. A single annotation looks like this:
<link rel="alternate" hreflang="en-gb" href="https://example.com/en-gb/pricing/" />
The value pairs a language code in ISO 639-1 format with an optional region code in ISO 3166-1 alpha-2 format. So en-gb means English for the United Kingdom, and de means German for any region.
Google treats hreflang as a strong hint, not a directive. It can still choose a different URL to show, and Google's John Mueller has said that hreflang does not guarantee a page gets indexed. Other search engines weigh the signal differently, so set the html lang attribute on every page as well.
The takeaway: hreflang is routing, not ranking. It decides which of your pages appears, not whether you appear.
Does hreflang Prevent Duplicate Content?
Only for pages written in the same language. Google's documentation on localized versions states that localized versions of a page are only considered duplicates if the main content remains untranslated, so a properly translated German page is never a duplicate of its English source.
The real duplicate risk sits with regional variants that share a language: en-us and en-gb, es-es and es-mx, fr-fr and fr-be. These pages are often almost word for word identical. Google may group them, choose one as the canonical and report the rest as duplicates. hreflang does not stop that grouping, but Google can still use the cluster to show the right regional URL in each country, even when it indexes only one version.
Two consequences follow. If your site only has translated pages, missing hreflang costs you wrong-language results, not a penalty. If you run same-language regional pages, hreflang alone is not enough: the pages need real regional differences too.

What Makes Same-Language Pages Genuinely Regional
- Prices and currency: USD on en-us, GBP on en-gb, with tax shown the way each market expects.
- Spelling and vocabulary: color and colour, localization and localisation, trash can and bin.
- Legal and compliance lines: VAT wording, data protection references, terms that name the right jurisdiction.
- Contact details: local phone numbers, support hours in the local time zone, local addresses.
- Examples and proof: case studies, logos and testimonials from the same market.
Rule of thumb: translation makes pages distinct, regional copies of one language do not.
How to Write hreflang Tags Correctly
A correct hreflang set has four parts: a valid code for every version, a fully qualified URL for every version, a self-reference on each page, and an x-default for searchers who match none of them. Most broken implementations get one of these wrong.
- Language first, region second: en-gb, never gb-en. Codes are not case sensitive.
- uk is the language code for Ukrainian. The United Kingdom is gb, so English for the UK is en-gb.
- A region on its own is invalid. hreflang="us" is read as a language code and ignored.
- Use absolute URLs, including https, and point only at canonical URLs that return a 200 status.
- Partial coverage is fine. Annotate the pages that have equivalents and leave the rest alone.
x-default marks the fallback page. Google's 2023 guidance on x-default suggests pointing it at the page most likely to help an unmatched visitor, often a language selector, rather than defaulting blindly to English.
The takeaway: if a code is wrong, Google does not guess. It drops that annotation and carries on.
A Worked Example: One Pricing Page in Four Locales
Below is a complete hreflang set for a pricing page served in US English, UK English, German and a global English version that doubles as the fallback. Every one of the four URLs carries exactly the same five lines, including the line that points to itself.
| hreflang value | URL | Who sees it |
|---|---|---|
| en-us | example.com/en-us/pricing/ | English searchers in the United States |
| en-gb | example.com/en-gb/pricing/ | English searchers in the United Kingdom |
| en | example.com/pricing/ | English searchers anywhere else |
| de | example.com/de/preise/ | German speakers in any country |
| x-default | example.com/pricing/ | Anyone whose language is not listed |
The hreflang set for the worked example. The global page carries two values, which is valid.
Copy this block into the head of all four pages:
<link rel="alternate" hreflang="en-us" href="https://example.com/en-us/pricing/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/en-gb/pricing/" />
<link rel="alternate" hreflang="en" href="https://example.com/pricing/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/preise/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing/" />
Each page also keeps a canonical tag that points to its own URL. A German searcher in Austria gets the de page, a British searcher gets en-gb, a Canadian searcher gets the global en page, and a French searcher falls through to x-default.

The takeaway: generate this block from one mapping table so every page carries an identical list.
Three Ways to Implement hreflang
Google accepts hreflang in the HTML head, in the XML sitemap or in an HTTP Link header. All three carry the same weight, so pick the one your stack can keep accurate as pages are added and retired.

HTML tags are the easiest to inspect, but a site with 20 locales adds 21 lines to every page head. Sitemap annotations list the same alternates inside each url entry and are the easiest to audit and to generate from a CMS or a static site build. HTTP headers are the only route for files without an HTML head, such as PDF data sheets.
Whichever method you choose, the sequence is the same:
- Build a mapping table of every page and its equivalents in each locale.
- Assign a valid language or language-region code to every locale.
- Set a self-referencing canonical on every localized page.
- Generate the hreflang output from the mapping table, never by hand.
- Crawl the site to confirm return links, codes and 200 status codes.
- Watch Search Console for canonical and indexing changes after release.
The takeaway: hand-maintained hreflang decays with every page you add, so automate it from day one.
How hreflang and Canonical Tags Work Together
Each localized page should be canonical to itself, and hreflang should list only canonical URLs. A canonical that points from one locale to another tells Google to drop that locale, and its hreflang annotations go with it.

This conflict is common after a migration or a theme change. A template canonicalizes every regional page to the US original, or a plugin points translated pages at the source language. The hreflang looks perfect in the code, and nothing works, because the canonical has already told Google that only one URL matters.
The takeaway: audit canonicals and hreflang together, never one without the other.
Seven hreflang Errors and How to Fix Them
Most hreflang failures come from a short list of mechanical errors, and a crawler can catch every one of them before Google does.
| Error | What happens | Fix |
|---|---|---|
| Missing return link | Google ignores the unconfirmed pair | Generate all tags from one mapping table |
| Invalid code (uk, en-uk, us) | The annotation is dropped | ISO 639-1 language plus ISO 3166-1 region |
| No self-reference | The cluster reads as incomplete | Every page lists its own URL |
| Alternate redirects or 404s | That version falls out of the set | Point only at final URLs that return 200 |
| Cross-locale canonical | The locale is treated as a duplicate | Self-referencing canonical on every locale |
| hreflang on noindex pages | Conflicting signals, wasted crawl | Annotate indexable pages only |
| Forced redirect by IP or browser | Crawlers never see other locales | Suggest a locale with a banner instead |
The seven most common hreflang errors, with the fix for each.
Google retired the Search Console International Targeting report in 2022, so detection now runs through two routes. A crawler with an hreflang report shows missing return links, invalid codes and non-200 alternates across the whole site. In Search Console, the Page indexing report and URL Inspection show when Google chose a different canonical than the one you declared, which is the clearest sign a regional page has been folded into another.
The takeaway: run the crawl after every release that adds, moves or retires localized pages.
Where Translation Quality Fits Into hreflang
hreflang only routes searchers; whether they stay depends on the page they land on. A correct tag that sends a German buyer to a machine-translated pricing page with the wrong legal terms is a technically perfect route to a lost lead.
The same risk logic that governs tags should govern the pages themselves. The NEX Translation Matrix™ scores each piece of content on content type, business risk, customer impact, regulatory requirement and quality expectation, then routes it to AI drafting, human refinement or independent review. It routes content, not projects: one locale launch usually needs all three outcomes at once, with blog posts on a light workflow and pricing, legal and checkout pages reviewed by a second linguist.
For teams launching new locales, NexTranslate's website and app localization services handle the translation, the regional adaptation and the URL structure together, and Linguistic Quality Assurance (LQA) adds an independent check on the pages buyers act on. Human proofreading is included in every tier of the published per-word pricing.
For the wider picture, the website and app localization guide covers locale strategy end to end, the website translation services guide compares delivery models, and the walkthrough on how to translate a website without breaking your SEO covers URL structures and migration. The post on multilingual SEO goes deeper on keyword research per market.
Frequently Asked Questions
Does hreflang improve rankings?
No. hreflang swaps the right regional or language URL into results; it does not raise a page's ranking. It helps indirectly, because searchers who land on a page in their own language click and convert more often.
Do I need hreflang if my site is only in English?
Only if you publish separate English pages for different countries, such as en-us and en-gb versions. A single English site with no regional versions needs no hreflang at all.
What is x-default in hreflang?
x-default is the fallback URL for searchers whose language or region matches none of your listed versions. It usually points to a language selector or to the global English page.
Should I use hreflang or a canonical tag?
Use both, because they do different jobs. A canonical names the master URL of a single page, and every locale should be canonical to itself; hreflang then links those self-canonical versions together.
Is en-uk a valid hreflang code?
No. The region code for the United Kingdom is gb, so the correct value is en-gb. On its own, uk is the language code for Ukrainian, so en-uk is ignored.
How long does hreflang take to work?
Expect weeks rather than days on a large site. Google has to recrawl every URL in a cluster and confirm the return links before it uses the annotations, so changes land as pages are recrawled.
Conclusion: hreflang Is Routing, Not Protection
hreflang does not shield translated pages from a penalty that does not exist. It tells search engines which version of a page belongs to which audience, and it only works when every version lists every other, every code is valid and every page is canonical to itself. The pages that need it most are the ones that look alike: same language, different country.
Get the mapping table right, generate the tags from it and audit canonicals alongside them, and the right page will reach the right market. If you are planning new locales and want the translation and the technical setup handled together, request a quote and the team will scope it with you.
