Broken hreflang tags send your UK visitor to a page built for America. They see dollar prices, then leave.
That happens on thousands of sites right now. Most owners never notice, because nothing looks broken. Google stopped reporting hreflang errors in Search Console back in 2022. Your setup can fail in complete silence while your international traffic quietly drops.
This guide covers the correct code, the six mistakes that break it, and why a valid tag can still fail. You will also learn how to check your setup now that Search Console no longer reports hreflang errors.
Key Points:
- Hreflang tags tell search engines which language or country version of a page to show. Google treats them as a signal, not a command.
- You only need them when the same page sits on separate URLs, like /en/ and /no/. A single-language site does not.
- Every page must list all versions, including itself, and each version must point back. Missing return links break the whole group.
- The UK is gb, not uk. A country code alone fails, and en_US is invalid because the separator must be a hyphen.
- Keep every canonical tag pointing at itself. Point a German page’s canonical at the English one and Google drops the German version.
- Google removed the International Targeting report in 2022, so check with Screaming Frog and the URL Inspection tool instead.
What Are Hreflang Tags?
Hreflang tagshttp://[https://ahrefs.com/blog/hreflang-tags are small lines of HTML code that tell search engines which language version of a page to show. They sit in your page code. They link pages that say the same thing in English, German, or Spanish.
Google rolled this markup out in December 2011 for sites targeting users in many languages and countries. But remember, it is a signal, not a command. Google usually follows it and can still pick another page.
Do You Actually Need Hreflang Tags?

You need hreflang tags only if the same page sits on separate URLs for different languages or countries. One site, one language, one country? Skip them. You have nothing to connect.
Check your URLs first. If /en/ and /no/ both exist, you need hreflang tags. The same goes for /us/ and /uk/, even though both pages are in English. Google can read those two as duplicates.
But if one URL switches language using cookies, browser settings, or a script, hreflang cannot help you. Google recommends separate URLs for each language, so fix that structure first.
One more check. Your pages must be the same page, just localised. A German article on a different topic is not an alternate version, so leave it out of the group.
How to Write an Hreflang Tag
Every hreflang tag has three parts: rel=”alternate”, the hreflang value, and the full URL. Miss one, and search engines ignore the tag.
html
<link rel=”alternate” hreflang=”de-DE” href=”https://example.com/de/” />
Read it left to right. The first part says this is another version, the second says who it is for, and the third says where to find it. The URL must start with https://, and the tag belongs inside your <head> section.
Language and Country Codes
The language code always comes first, and the country code is optional. Language uses ISO 639-1, like en or nb. Country uses ISO 3166-1 alpha-2, like GB or NO. Three errors break most tags: the UK is gb not uk, a country code alone fails because SE reads as Northern Sami, and en_US is invalid since the separator must be a hyphen.
Every Page Must Point to Itself and Back
Each page must list every version in its group, including itself. So a site with English, German, and Norwegian pages carries three tags on all three pages. If your English page points to the German one, the German page must point back, and Google lists missing return links as a common mistake.
The x-default Tag
The x-default tag tells search engines which page to show when nobody matches your listed versions. A visitor from Brazil arrives, you have no Portuguese page, so they land here instead. Point it at a global homepage or a country selector, and remember it means “everyone else,” not your main language.
Where to Put Hreflang Tags

You can place hreflang tags in three spots: your HTML head, your XML sitemap, or your HTTP headers. All three work the same way, so pick one and stick with it.
Most small sites should use the HTML head, since you can check it by viewing the page source. Bigger sites move to the sitemap because 10 languages across 2,000 pages means 20,000 tags in your code. HTTP headers cover files with no head section, like PDFs.
Hreflang Examples You Can Copy
Copy the block that matches your setup, swap in your URLs, and paste it into the <head> of every page in the group.
Two languages:
html
<link rel=”alternate” hreflang=”en” href=”https://example.com/en/” />
<link rel=”alternate” hreflang=”nb-NO” href=”https://example.com/no/” />
<link rel=”alternate” hreflang=”x-default” href=”https://example.com/” />
One language, two countries:
html
<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=”x-default” href=”https://example.com/” />
The same block goes on every version, not just one.
Common Hreflang Mistakes
Most hreflang problems come from six errors, and each one can break your whole group.
- Missing return links. Page A points to Page B, but B never points back. Google lists this as a common mistake.
- No self-reference. Every page must include a tag pointing to itself.
- Wrong codes. The UK is gb, not uk. Czech is cs, not cz.
- Relative URLs. Use the full address with https://, not /en/about.
- Broken targets. Tags must point to live pages, not redirects, 404s, or noindexed URLs.
- Tags outside the head. An unclosed script or image tag can end your <head> early and make the browser ignore everything below it.
Fix the return links first. That single error causes more failures than the rest put together.
Hreflang Tags vs Canonical Tags
Canonical tags pick one page to keep, while hreflang tags keep every version and route users to the right one. They pull in opposite directions, which is why mixing them up causes trouble.
| Canonical | Hreflang | |
| Job | Merge duplicates into one URL | Connect versions for different audiences |
| Result | Only one page gets indexed | All versions stay indexed |
| Direction | One way | Two way |
Here is the rule that matters. Every page needs a canonical tag pointing at itself, not at your main language version.
Point your German page’s canonical at the English page and you send two conflicting signals. Google follows the canonical, drops the German page, and your setup stops working.
Why Your Hreflang Tags Are Not Working
Your code can be correct and still fail, because hreflang is a hint, not a command. Google reads it, weighs other signals, then decides.
Four things usually cause it. Your pages look too similar, so Google merges them. Search engines do not index your alternate page. Your site redirects visitors by location, so Googlebot never sees the other version. Or an unclosed script tag ends your <head> early and hides the tags below it.
How to Check Your Hreflang Tags
Start by opening your page source and looking for the tags in the <head> section. If these elements are missing, nothing else matters. Right-click the page, choose View Page Source, then search for “hreflang”.
For anything bigger, use a crawler. Screaming Frog flags missing return links, missing self-references, and invalid codes across your whole site. Google Search Console’s URL Inspection tool checks each version’s index status.
One thing to know. Google removed the International Targeting report from Search Console in 2022, so hreflang errors no longer appear there. Some guides still send you to it.
What Hreflang Costs and How to Prove It Worked
The tags themselves cost nothing, but the work around them does. A two-language site takes an hour if your CMS handles it. A shop with 10 markets needs developer time and a script to generate the tags.
The bigger cost is content. Google merges pages that look alike, so each version needs its own prices, addresses, and local wording. That means translation work, not just a plugin.
To prove it worked, take a baseline first. Note your clicks and impressions by country in Search Console. Check again after 4 to 8 weeks and look for growth in your target markets.
Is Hreflang Still Relevant?
Yes, Google still documents and supports hreflang, and no replacement exists. What changed in 2022 was the Search Console report, not the standard itself.
Google reads language on its own now. But it cannot guess your business intent. Two English pages with identical text give no clue whether you meant one for Australia and one for Canada. That gap is what hreflang tags fill.
On AI search, be careful with what you read. No public documentation explains how AI Overviews and chat tools choose a language version. Nobody knows yet, so treat any confident claim about it as guesswork.
FAQs
What is the difference between hreflang and the HTML lang attribute?
Hreflang connects different versions of the same page, while the lang attribute only states the language of the page you are on. Google has said it largely ignores the lang attribute because it is so often wrong.
Does Bing use hreflang tags?
Bing treats hreflang as a weak signal and prefers the content-language meta tag. Fabrice Canel of Microsoft’s Bing team confirmed this publicly. Yandex supports hreflang, and Baidu does not use it.
What happens to hreflang when I change domains?
Every tag pointing to the old domain becomes a redirect, which breaks the group. Update all hreflang URLs to the new domain on launch day, not weeks later.
Do hreflang tags improve my rankings?
No, They change which version of a page appears, not how high it ranks. A page sitting fifth in the US will sit around fifth in the UK too.
How long does it take to see results?
Expect 4 to 8 weeks, depending on how often Google crawls your site. Track clicks and impressions by country in Search Console rather than watching rankings..
Conclusion
Hreflang tags only matter when the same page sits on separate URLs for different languages or countries. Get the codes right, make every page point to itself and back, and keep your canonical tags self-referencing. Those three things prevent most failures.
The rest is upkeep. Check your page source after launch, run a crawler for anything larger than a handful of pages, and give each version its own prices and local wording so Google keeps them apart.
Open your page source today and check whether your hreflang tags are actually there.