What Is Hreflang and How Does It Work? A Simple Guide
By Istiak Ahmed Soikot, Founder and CEO, Rank OG
Key takeaways
- Hreflang is a set of tags that tell Google which language and region versions of a page exist so searchers see the right one, and Google treats it as a serving signal that changes which version is shown, not a ranking factor, while Google detects page language with its own algorithms, not hreflang.
- Use hreflang when you have more than one page version for different languages or regions, including translated templates, regional variations in one language, and fully translated content.
- Every page must list itself and every other version with an identical link set, and every link must point back both ways; one-way tags fail silently and Google ignores them entirely.
- Use fully qualified https URLs, valid ISO 639-1 language codes with optional ISO 3166-1 Alpha 2 region codes (cities are not supported), and keep each hreflang link in its own tag without mixing other attributes.
- Pick one implementation method, HTML, headers, or sitemap, and maintain it consistently, since using all three adds no benefit and is harder to manage.
Last reviewed: November 2026
Hreflang tags tell Google which language and region versions of a page exist, so searchers see the right one. Google treats them as a serving signal, not a ranking factor. This guide explains the 5 simple rules that keep hreflang tags working.
This guide is for business owners and marketers running a website in more than one language or region. If your US page keeps showing up for UK searchers, or your English page ranks in front of German buyers, broken or missing hreflang tags are a likely cause. If you want a specialist to check this for you, see Rank OG’s international SEO services.
What exactly are hreflang tags?
Hreflang tags are small pieces of code that tell Google which language and region versions of a page exist, so the right searcher gets the right version. Google’s documentation frames them as the way to signal that pages are localized variations of the same content.
A common misunderstanding is that hreflang tells Google what language a page is written in. It does not. Google does not use hreflang or the HTML lang attribute to detect language; its own algorithms do that. Hreflang only describes the relationship between versions.
How do hreflang tags work in Google Search?
When Google finds these annotations, it uses them as a signal about which page to serve to which searcher. A searcher whose browser is set to French becomes more likely to see the French version of a page, according to Google’s own example. The tags point users to the most appropriate version of a page by language or region.
Here is the honest limit: hreflang changes which version gets shown, not how well any version ranks. Google treats it as a serving signal, so it cannot rescue a page with weak content or no authority. And even without any hreflang annotations, Google might still find your alternate language versions on its own, though Google says it is usually best to indicate them explicitly.
When do you actually need hreflang?
You need hreflang when your site has more than one version of a page for different languages or regions. Google recommends it for three situations, and the first one catches many businesses by surprise.
First, when you keep the main content in a single language and translate only the template, such as the navigation and footer. Pages with user-generated content, like forums, typically do this. Even though most of the page is untranslated, Google still recommends hreflang for it.
Second, when your content has small regional variations in a single language. Think English-language pages targeted to the US, the UK, and Ireland, with different prices or shipping details. Same language, different versions, so hreflang belongs there.
Third, when your site content is fully translated into multiple languages, like German and English versions of each page. This is the classic case everyone expects.
One reassurance from Google: localized versions of a page are only considered duplicates if the main content remains untranslated. Translated pages are not duplicates, so a proper multilingual site does not create a duplicate content problem by itself.
What are the 5 rules that keep hreflang tags working?
Google’s hreflang documentation is short, and its rules are strict. Most hreflang setups fail not because the concept is complex, but because one of these five rules gets skipped.
Rule 1: Every page must list itself and every other version
Each language version of a page must include links to itself plus all the other versions. If you have English, French, and German versions of a page, every one of those three pages carries the identical set of three links. Google is explicit that the set of links is identical for every version of the page. Anything less leaves a version floating outside the cluster.
A practical tip: generate the link set from a single template or data source so versions cannot drift apart.
Rule 2: Every link must point back at each other
If two pages do not both point to each other, Google ignores the tags entirely. Google says this rule exists so someone on another site cannot arbitrarily create a tag naming itself as an alternative version of one of your pages. One-way tags fail silently, which makes missing return links the most common hreflang mistake.
If a complete bidirectional set is hard to maintain, Google says to at least link new language pages back to the originating or dominant language.
Rule 3: Every URL must be fully qualified
Alternate URLs must be fully qualified, including the transport method. Use https://example.com/page/, not //example.com/page/ or /page/. Relative URLs are not supported in hreflang annotations, and a relative URL quietly breaks the annotation. The good news: alternate URLs do not need to be in the same domain, so hreflang works across ccTLDs, subdomains, and subdirectories alike.
Rule 4: Use real language and region codes
Language codes must come from ISO 639-1 and region codes from ISO 3166-1 Alpha 2. Values outside those standards, such as es-419, are not supported. Codes are case-insensitive, but writing regions in uppercase, like en-GB, follows the standard convention.
Think of the value in two parts: en means English for any region, while en-GB means English specifically for users in Britain. For groups of regional variants, Google suggests adding a catch-all, like a generic en page for English speakers in locations you did not list specifically. And for unmatched languages, use the x-default value as the fallback page, which is especially useful on language or country selector pages.
Rule 5: Pick one implementation method, not all three
Google offers three equivalent ways to declare hreflang tags: HTML link elements in the page head, HTTP headers in the server response, and entries in the XML sitemap. The three methods are equivalent from Google’s perspective, and you can choose whichever is most convenient for your site. But using all three at the same time brings no benefit in Search, and Google warns it may be much harder to manage three implementations instead of one. Pick one and maintain it well.
Which hreflang method should you choose?
The right method depends on what your pages look like and how your team works. All three do the same job, so the choice comes down to maintainability.
| Method | Best for | Advantage | Watch out for |
|---|---|---|---|
| HTML link tags | Most websites | Visible in the page source, so they are easy to audit by hand | Your template must output the full identical set on every page version |
| HTTP header | PDFs and other non-HTML files | Works where there is no HTML head to put tags in | Easy to forget when files are replaced or regenerated |
| XML sitemap | Large sites with many locales | One generated file, no template changes needed | Every version needs its own url entry with the identical set of child entries |
Verdict: use HTML tags for a small to mid-size site, since they are the easiest to inspect and debug. Use the sitemap method on a large site where editing every template is expensive, but remember each url entry must carry the full set of xhtml:link entries, including itself. Use HTTP headers only for files that cannot carry HTML, like PDFs. Never run more than one method at once; the redundancy adds maintenance cost with zero ranking benefit.
What breaks hreflang most often?
Broken hreflang fails silently, with no warning when Google ignores the tags. Check these mistakes first.
Missing return links top the list. Confirm every version links back to the others, since one version without return links breaks the bidirectionality Google requires.
Relative URLs come next. Any URL without the full https address is unsupported and effectively dead, an easy mistake when copying a template.
Invalid codes are third. Values like es-419 are not supported, so the annotation gets dropped. Stick to ISO 639-1 for language and ISO 3166-1 Alpha 2 for region.
Fourth, do not combine hreflang annotations with other attributes in one link tag. Google specifically warns against this, so keep each hreflang link clean and separate.
Fifth, do not dynamically swap content or reroute users by language settings as a substitute for hreflang. Google recommends using different URLs for each language version, and warns that if you reroute users based on language settings, it might not find and crawl all your variations. Different URLs plus hreflang beat language detection tricks.
If these checks feel overwhelming, this is squarely technical SEO work. A structured audit, like Rank OG’s technical SEO services, catches all five of these in one pass.
How do you check whether your hreflang works?
Use this five-step check on a page cluster whenever you launch a new language or region.
- Open the page source and confirm the full identical set of hreflang tags sits inside the head section, with one link per page version including the page itself.
- Click through every URL in the set and confirm each one is fully qualified with https and loads correctly.
- Confirm return links: open each alternate version and verify it lists the original page back.
- Verify every code against the supported standards, one language code plus an optional region code, and add x-default for unmatched languages.
- Re-crawl the site after adding or removing any locale, since a new page version without the full link set silently breaks the cluster for everyone.
Hreflang questions, answered
Do hreflang tags improve my Google rankings?
No. Google treats hreflang tags as a serving signal, not a ranking signal. The tags help Google show the right language version to the right searcher, but rankings still come from normal signals like content quality and links. Broken tags do not drop you, they just show the wrong page.
Do I need hreflang tags if my site is only in one language?
Usually no, unless you have regional versions in the same language. Google recommends hreflang tags when you keep content in one language but vary it by region, like US and UK pages with different prices. One language and one version per page needs no hreflang at all.
What happens if my hreflang tags do not point back at each other?
Google ignores them. If two pages do not both point to each other, Google ignores the tags, which stops another site from claiming to be your alternate. Every page must list itself and every other version, and each listed page must return the link. One-way tags fail silently.
Can hreflang tags target a city instead of a country?
No. Hreflang tag values support ISO 639-1 language codes and optional ISO 3166-1 Alpha 2 region codes only. Values outside those standards, like es-419, are not supported. The region part is a country or territory code, so cities cannot be targeted. Use dedicated city pages for city-level targeting instead.
Should I put hreflang tags in HTML, headers, and sitemaps at once?
No. Google says the three methods for hreflang tags are equivalent, and using all three brings no benefit in Search. In fact, Google warns it can be harder to manage three implementations instead of one. Pick the method your team can maintain reliably and use it consistently on every page.
Sources
Google Search Central, Tell Google about localized versions of your page. Google Search Central, Managing Multi-Regional and Multilingual Sites. Sources checked November 2026.
If your multilingual site keeps sending searchers to the wrong language version, get a free SEO audit from Rank OG. Hreflang tags, canonicals, and indexation are part of every international review we run. Questions first? Contact us and we will take a look.



