Mastering Hreflangs: The Step-by-Step Setup Guide
By Toy Wen Da, Co-Founder · Updated · 10 min read · scored 90/100
Mastering hreflangs comes down to three technical details: valid ISO language-region codes, reciprocal links between every page version, and one self-referencing tag per page. Miss any one of them and search engines quietly ignore your setup, then show the wrong language version to the wrong visitors, often with no error message at all.

What hreflang tags do and why international SEO depends on them

A hreflang tag is an HTML attribute that tells search engines which language and region a specific page is meant for. Google introduced it in December 2011 because sites with the same content in several languages were competing against themselves in search results, and search engines had no reliable way to know which version to show which visitor.
The tag follows a fixed format: hreflang="language_code-region_code". So hreflang="en-us" targets English speakers in the United States, while hreflang="es-mx" targets Spanish speakers in Mexico. Get the codes right and search engines can match content to intent with confidence. One Semrush analysis found that correctly implemented hreflang tags raised click-through rates on international pages by as much as 30%, because visitors landed on a page written in their own language instead of bouncing off one that wasn't.
Hreflang also solves a duplicate-content problem. When you publish near-identical English content for the US, the UK and Australia, search engines can read it as the same page published three times, and hreflang tells them the repetition is intentional. It belongs among the early checks in a technical SEO audit for any site serving more than one market.
Hreflang is a signal, not a command. Google weighs it alongside relevance, authority and other ranking factors, so a page with strong hreflang signals but thin content still won't outrank a stronger competitor. Treat it as one piece of a broader international SEO strategy.
Setting up and mastering hreflangs: step by step
Mastering hreflangs is mostly about sequencing. Do these steps out of order and you'll end up rebuilding your tag network from scratch.
Step 1: map your language-region pairs
Before writing any code, list every language-region combination your site actually serves. A common setup looks like en-us, en-gb, es-es and de-de. Airbnb's homepage carries 63 different hreflang tags, one for each language-region version it maintains, which shows how quickly the list grows for a large international business. Most sites need far fewer. Write the list down before you touch a tag, because guessing at pairs as you go is how reciprocal links break later.
Step 2: choose an implementation method
Hreflang tags can live in three places, and each suits a different type of site.
| Method | Best For | Pros | Cons |
|---|---|---|---|
| HTML head tags | Small to mid-size sites with full control over page templates | Simple to read, works without extra infrastructure | Adds weight to every page's head section |
| XML sitemap | Large sites with hundreds or thousands of URLs | Keeps hreflang out of the HTML, easier to bulk-update | Requires the sitemap to be crawled and parsed correctly |
| HTTP headers | Non-HTML files like PDFs, or sites that can't edit page templates | Works where HTML markup isn't an option | Needs server-level configuration, harder to audit visually |
Pick one method per page and stick with it. Mixing them on the same URL, such as HTML tags on some pages and sitemap entries on others, is a common mistake and a reliable way for an implementation to fall apart quietly.
Step 3: use valid language and region codes
Hreflang codes follow two standards: ISO 639-1 for language and ISO 3166-1 Alpha-2 for region. A wrong code, like en-USA instead of en-us or english instead of en, makes the whole tag invalid. Some codes aren't intuitive: the United Kingdom is gb, not uk. Check every code against the ISO list instead of trusting your memory.
Step 4: add reciprocal and self-referencing tags
Every language version of a page must reference every other version, and itself as well. If your English page links to your Spanish and French versions, those pages need to link back to the English one and to each other. Miss one direction and search engines may discard the entire hreflang network for that page cluster rather than partially trust it.
Step 5: decide whether you need x-default
Google and Yandex introduced the x-default attribute in April 2013, originally for homepages that redirect visitors to a language-selector page. It is now used more broadly as a fallback for any visitor whose language or region isn't covered by your specific tags. Google's own analysis found that sites implementing x-default saw 7% higher engagement from international visitors, likely because those visitors land on a sensible default instead of a mismatched page or a 404.
Step 6: validate before you ship
Once your tags are live, check them before assuming they work. Google Search Console's International Targeting report flags common errors, and a dedicated hreflang validator can scan a page or a full site for missing reciprocal links, invalid codes and broken self-references in one pass. Then wait. Search engines typically take two to four weeks to fully process newly implemented or updated hreflang tags, so don't declare a setup failed because rankings haven't moved after a few days.
Common hreflang mistakes that quietly cost you rankings

Most hreflang failures aren't dramatic. They're small formatting or logic errors that sit unnoticed for months while international pages underperform.
| Mistake | What It Looks Like | The Fix |
|---|---|---|
| Incomplete reciprocal network | Your English page links to Spanish, but Spanish doesn't link back | Audit every page cluster for two-way links, not just outbound ones |
| Invalid language or region codes | en-USA or english instead of en-us |
Cross-check every code against ISO 639-1 and ISO 3166-1 Alpha-2 |
| Conflicting geotargeting signals | Hreflang says one region, Search Console geotargeting says another | Align hreflang, ccTLD or subdirectory structure, and Search Console settings |
| Missing self-referencing tags | A page lists alternates but never references itself | Add a hreflang tag pointing the page to its own URL |
| Mixed implementation methods | Some pages use HTML tags, others rely on the sitemap | Standardize on one method sitewide |
These problems are real. Booking.com found hreflang errors scattered across its 40-plus language versions, and after fixing them it saw a 24% increase in organic traffic to non-English variants within three months. Gaps like that are common on sites that added international pages gradually, without a single implementation standard from the start. Because the errors rarely cause broken pages or console warnings, running these checks alongside a broader SEO checklist is the practical way to catch them.
Structuring your site for international SEO

Your site structure shapes how hreflang tags map to URLs, and there are three common patterns.
| Structure | Example | Setup Effort | Best For |
|---|---|---|---|
| Subdirectories | example.com/es/ | Low, hreflang and hosting stay on one domain | Most businesses expanding into a few new markets |
| Subdomains | es.example.com | Medium, needs separate DNS and hosting configuration per subdomain | Sites where regional teams manage content independently |
| Country-code domains (ccTLDs) | example.es | High, each domain needs its own SEO authority built from scratch | Large enterprises with dedicated in-market teams and budget |
Subdirectories are the most common choice because they consolidate domain authority instead of splitting it across separate properties. ccTLDs send the strongest local-relevance signal to users and search engines, but they take longer to rank because each domain starts without the link equity the rest of your site has built. If you're weighing separate country domains, read what happens when multiple domains enter the picture before committing, since the wrong structure can undo the benefit hreflang tags are supposed to provide.
Whichever you pick, keep the URL pattern consistent. Hreflang tags reference full URLs, so a structure that changes mid-migration, with subdirectories for some markets and subdomains for others, multiplies both the tags you maintain and the places they can break.
Measuring whether your hreflang setup is working
Start with localized bounce rates. Properly implemented hreflang tags typically reduce them, since visitors land on content in their own language, and a 15-25% reduction is generally treated as a sign the setup is working. Segment organic traffic and conversion data by language-region pair as well, because site-wide aggregates hide what is changing in each market.
The scale of impact varies by starting point. One multinational retailer tracked hreflang performance over six months and saw a 34% increase in non-English organic traffic and a 22% improvement in conversion rates among non-English visitors, evidence that search engines were routing users to language-appropriate pages. A global SaaS company reported a 47% increase in international conversions after pairing hreflang tags with localized content delivery and region-specific schema markup, which suggests hreflang works best as part of a coordinated international setup rather than on its own.
For the canonical source, read Google's documentation on localized versions of a page, which explains how the signal is meant to behave. Beyond Search Console's International Targeting report, a recurring full-site SEO audit that covers hreflang, indexability, crawl errors and structured data gives you one place to catch regressions instead of checking international targeting in isolation.
FAQs
What is the difference between a hreflang tag and a canonical tag?
A hreflang tag tells search engines which language and region version of a page to show a given visitor. A canonical tag identifies the single authoritative version among duplicate or near-duplicate URLs. Use hreflang for genuinely different language or regional content, and canonical tags to consolidate ranking signals within a single language version. Never point a canonical tag across language versions; Google treats that as a directive and may ignore your hreflang signals entirely.
Do I need hreflang tags if my site only has one language version?
No. Hreflang exists to help search engines choose between multiple language or regional versions of similar content. If you publish in one language for one audience, there's nothing for it to sort out, and adding tags would only create maintenance overhead with no benefit.
Why isn't Google respecting my hreflang tags?
The most common causes are incorrect language-region codes, missing reciprocal links between versions, or conflicting geotargeting signals elsewhere in Search Console. A robots.txt file can also block search engines from crawling the alternate URLs your tags reference. Work through each of those before assuming the tags themselves are the problem.
What is x-default and when should I use it?
The x-default attribute is a fallback hreflang value for visitors whose language or region doesn't match any of your specific tags. It's most useful on language-selector pages and global homepages. Include only one x-default tag per URL, because more than one causes search engines to disregard the attribute altogether.
How long does it take for hreflang changes to affect rankings?
Expect search engines to take two to four weeks to fully process newly implemented or updated hreflang tags. Ranking and traffic shifts tied to hreflang usually show up gradually over that window, not right after deployment, so give a change time before troubleshooting it as broken.
Run your hreflang tags through a real audit
Theory only gets you so far when the tags on your site might already be broken. If you're not sure whether your reciprocal links, region codes or x-default setup work, start there. Mastering hreflangs means seeing your own pages the way a search engine does. Get a sample SEO report and talk to the team about what your international pages are telling Google.
Resources / References
Sources
- Your Ultimate Guide to International SEO Success
- What are Hreflang Tag Attributes And How To Implement ...
- Mastering Hreflang Implementation for Multilingual SEO
- Mastering HREFLang x-default - International Web Mastery
- If I don't utilize hreflang attributes is it bad for SEO?
Disclaimer: This article is general information about rules and figures that applied when it was written, not personalised financial, tax or investment advice. It does not take account of your income, obligations, risk tolerance or goals, and rates and thresholds change. Verify the current position with the relevant authority, and speak to a licensed adviser or a qualified accountant before acting.
About the author
SearchBlueprint researched, wrote and scored this article with the content pipeline our customers run on their own sites. The score in the byline is what our content engine gave this page before it published. Nothing here is reviewed by hand, which is the point: it is the product's output, published where anyone can check it.