Hreflang in Practice: Syntax, Regional Pages, Bidirectional Links, and Common Mistakes
1. What hreflang solves: not a bonus, but a safeguard against misclassification
Let’s clear up a popular misconception first: hreflang does not improve rankings. Google has said many times that hreflang tags are not a ranking factor. What it solves is a different problem: when your German page and your English page cover the same product, Google may flag the German page as duplicate content of the English page.
Without hreflang, Google can only guess which version to show users in which country based on language detection. Guess wrong and German users land on the English page, bounce rates climb, and rankings drop. hreflang is the instruction manual you hand Google: these pages are translations of each other, so serve them by user language.
| Common Misconceptions | Reality | Consequence |
|---|---|---|
| hreflang improves rankings | Not a ranking factor; it only affects version selection | Adding it won’t move you up |
| Once added, it always takes effect | Break one rule and the whole set fails | The International Targeting report shows errors |
| You only need to add it to the English page | Every version needs it, and links must be bidirectional | One-way tags don’t work |
| Use rel=alternate instead | That’s for responsive/mobile versions | Multilingual sites must use hreflang |
2. Three ways to place it: choose by site size
You can put hreflang in three places. All three work the same way, but they differ in maintenance cost and crawl speed. Choose based on how many language versions and pages your site has.
| Placement | Syntax | Best for | Crawl speed |
|---|---|---|---|
| head link tag | link rel=”alternate” hreflang=”de” | 5 or fewer language versions, 200 or fewer pages | Instant, crawled with the page |
| XML sitemap | xhtml:link child tag | Large multilingual sites, recommended | Recrawled in 3 to 7 days |
| HTTP header | Link field in the response header | Only for non-HTML files like PDFs | Crawled with the file |
Picture this: your site has 5 languages — English, German, French, Spanish and Arabic — with 50 product pages each, 250 pages in total. Generate them in bulk with a head link template: 5 lines of tags in each page’s head, and maintenance stays manageable. Scale to 12 languages and 2,000 pages, though, and head links start slowing the page down. That’s when you move to an XML sitemap and generate the alternative entries programmatically.
Don’t use the HTTP header method on HTML pages — that’s meant for PDF download links. Mixing the three methods makes the same set of tags get declared more than once, Google picks one set, and troubleshooting gets harder.
With the sitemap method, the structure puts two xhtml:link child tags under each URL node — one pointing to the English version, one to the German version — plus an x-default entry. The upside: when you change a language version, you edit one sitemap file instead of every page’s head. The downside: Google takes 3 to 7 days to recrawl the sitemap, so it’s no good for urgent fixes. For multilingual sites with more than 500 pages, generate it programmatically rather than writing it by hand.
3. Language and country codes, regional pages, and bidirectional references
Codes are where hreflang goes wrong most often. Use two lowercase letters from ISO 639-1 for the language code (de, fr, ar) and two uppercase letters from ISO 3166-1 for the country code (DE, AT, US). A language code on its own covers that language in all regions; add a country code to target a specific country.
| How it’s written | Meaning | Where it’s used |
|---|---|---|
| hreflang=”de” | German, any country | Germany and Austria share one page |
| hreflang=”de-DE” | German as used in Germany | Content localized for Germany only |
| hreflang=”de-AT” | German as used in Austria | Page for Austria’s price and regulatory differences |
| hreflang=”en-GB” | British English | Pricing page in pounds sterling |
| hreflang=”x-default” | Fallback default version | Every group needs one, usually pointing to the English page |
How to decide on regional pages: if Germany and Austria differ only in price, regulations and contact details while the product content is the same, make one German version plus one Austria differences page — don’t translate the full text for every German-speaking country. For when a separate regional page is actually warranted, see Build landing pages by country so you don’t end up with doorway pages that get flagged as spam.
How bidirectional references work in practice: the German page’s head carries hreflang=”en” pointing to the English page, and the English page’s head must carry hreflang=”de” pointing to the German page. Each page also needs a self-reference (pointing to its own language version), and both need x-default. Miss any one of these and Google will ignore the whole set of tags.
The self-referencing tag is the one people skip most often. Everyone remembers to point at the other language versions, but forgets to point at themselves. In a correct set, the English page needs a line with hreflang=”en” pointing to its own canonical URL, and the German page needs a line with hreflang=”de-DE” pointing to itself. Google uses the self-reference to confirm that you consider this version one of the canonical versions. Without it, Google treats the set as incomplete and skips it entirely.
4. Common mistakes and how to troubleshoot them
Verify hreflang 3 to 7 days after launch. The International Targeting report in Search Console lists the specific errors. Fix them one by one using the table below.
| Error type | What triggers it | Fix actions |
|---|---|---|
| URL returns 404 | The page on the other side was deleted but the tag stayed | Remove the tag or point it at the new page |
| A noindex page is in the set | A noindexed version still carries hreflang | Remove that page from the tag set |
| Wrong letter case in the language code | Written as de-de instead of de-DE | Capitalize the country code |
| HTTP and HTTPS don’t match | The sitemap lists an http page that is actually https | Use the full https URL everywhere |
| Paginated and filtered pages get mixed in | A filtered product listing URL is treated as a language version | Only canonical pages get tags |
| Missing x-default | The fallback tag is missing | Add one tag per set pointing to the English page |
Troubleshooting takes three steps. First, run one URL through the Rich Results Test or a third-party hreflang checker to see whether the whole set is complete. Second, check the International Targeting report in Search Console to see how many errors Google actually found. Third, once fixed, submit with the “Validate Fix” button; Google takes about 2 to 4 weeks to re-evaluate. For the full five gates every multilingual page must pass, see Multilingual Content Publishing Process; hreflang is the last of them.
One easy-to-miss boundary: hreflang only works between pages that are translations of each other. If your German page and your English page are actually two completely different articles that just happen to be in different languages, don’t force them into one hreflang set. Google checks whether the content really is a translation, and if it isn’t, it ignores the whole set. Cross-language pages must be translations of the same product and the same topic, with roughly matching structure and paragraph counts.
Translation quality affects hreflang too: machine-translated pseudo-localized pages won’t be shown to the target country even with correct tags, because Google judges the content quality as low. So before you launch hreflang, the content has to pass post-editing spot checks. For terminology and number localization, see also Charts and tables on multilingual sites.
FAQ
Should hreflang go in the head or in the sitemap?
Do hreflang tags actually improve rankings?
Why isn’t my hreflang working even though I added it?
Germany and Austria both speak German. Do I need two hreflang tags?
What is x-default, and is it required?
How long after fixing hreflang errors will I see results?
Final thoughts
hreflang is the classic technical detail nobody praises you for getting right, but one mistake and all your work is wasted. It won’t boost your rankings, but miss a single tag or get one character wrong and Google may treat your carefully localized pages as duplicates, undoing everything.
Three steps to put this into practice: this week, use a checking tool to audit the full hreflang set on 5 core product pages; next week, follow the four rules to add bidirectional references, self-references, x-default, and absolute URLs; in week three, once the International Targeting report in Search Console shows zero errors, hit Validate Fix. If you’re still torn between subdirectories and separate sites at the architecture level, go back to Hreflang for multilingual sites for the overall call.
One line worth remembering: hreflang doesn’t boost your rankings, it sends Google a map of translation relationships. The map must be complete, bidirectional, and include a fallback. Miss one link and the whole map is void.
