SEO
Hreflang Tags Guide: Set Up Multilingual SEO Correctly
By Kavin P · · 7 min read

If your website serves people in more than one language or country, search engines need help deciding which version to show to whom. Without guidance, a visitor in Canada might see the US page, or a Spanish speaker might land on the English one. This hreflang tags guide explains the annotation made for exactly that problem, and how to implement it without the usual mistakes.
Hreflang does not boost rankings by itself. It tells search engines that several pages are alternates of each other for different languages or regions, so the right one can be served to the right user. For the wider strategy, read international SEO basics first.
When you need hreflang
Use it when you have equivalent content for different audiences:
- The same page translated into several languages.
- Versions for different regions in the same language, such as English for India, the UK and the US, with different pricing or spelling.
- A mixture of both.
You do not need it for a single-language site targeting one country, or for pages that are not equivalents of each other. Automatically translated pages with no review are a separate quality concern, since low-quality translations may do more harm than good.
How hreflang works
Each page lists all of its alternate versions, including itself, using a language code and optionally a region code. A French page for Canada uses fr-CA. An English page for any region uses en. A page for users who match no listed version can be marked x-default.
The key rule is reciprocity: if page A points to page B as an alternate, page B must point back to page A. Missing return links are the most common reason hreflang is ignored.
Language and region codes
- Language codes follow ISO 639-1, such as en, fr, de, hi, ta.
- Region codes follow ISO 3166-1 alpha-2, such as US, GB, IN, CA.
- A region cannot be used alone. Write en-IN, never just IN.
- Use hyphens, not underscores.
Choose the level of detail you actually need. If your English content is identical everywhere, a single en annotation is enough. Only create regional variants when the content genuinely differs, as in currency, shipping, legal text or terminology.
Three ways to implement it
You can use any one of these methods. Do not mix them in conflicting ways for the same URLs.
1. HTML link elements in the head
Add a set of link elements to every page in the group:
- rel="alternate" with hreflang="en" and the English URL.
- The same for each other language or region.
- An x-default entry for the fallback page.
This is simple for small sites but becomes heavy when there are many languages.
2. HTTP headers
For non-HTML files such as PDFs, send hreflang information in the HTTP response header. This is rare but useful when you serve language-specific documents.
3. XML sitemap
List the alternates inside the sitemap entries. This keeps the page code clean and is easier to maintain at scale because everything lives in one file. See the XML sitemap and robots.txt guide for sitemap basics.
Combine hreflang with canonical tags correctly
Each language version should have a self-referencing canonical tag. Do not canonicalise the French page to the English page, because that tells search engines to treat the French version as a duplicate and ignore it. The canonical tags explained article covers the principles. Hreflang and canonicals must agree: the URL you list in hreflang should be the canonical, indexable version.
Choose a URL structure
There are three common options:
- Country-code domains such as example.fr. Strong geo signal, but more domains to maintain.
- Subdomains such as fr.example.com. Flexible, but treated more separately.
- Subfolders such as example.com/fr/. Easiest to manage and consolidates authority on one domain.
Many businesses choose subfolders for simplicity. Whatever you choose, keep it consistent and document it. The decision is also influenced by hosting, legal requirements and how different the offerings are.
Implementation steps
- List every page that has equivalents, and group them into sets.
- Decide the language and region codes for each version.
- Choose one method of implementation.
- Generate the annotations, ensuring each set is fully reciprocal and includes a self-reference.
- Make sure every referenced URL returns a successful status, is indexable and is canonical.
- Add x-default where you have a selector page or a sensible fallback.
- Test, deploy and monitor.
On a CMS such as WordPress, translation plugins can generate these annotations automatically, but still verify the output. See WordPress plugins for marketers for tools to evaluate.
Common mistakes
- Missing return links, so annotations are ignored.
- Wrong codes, such as en-UK instead of en-GB.
- Pointing to redirected or blocked URLs, which breaks the set.
- Mixed methods that contradict each other.
- Canonical conflicts, where hreflang URLs differ from canonical URLs.
- Annotating pages that are not true equivalents, such as linking a product page to a category page.
- Forgetting new pages when content is added later.
A concrete example
Imagine a company with an English page for global visitors, an English page for India and a Hindi page.
- Global English: example.com/pricing
- India English: example.com/en-in/pricing
- Hindi: example.com/hi/pricing
Each of the three pages would list all three as alternates, including itself:
- en for the global page.
- en-IN for the India page.
- hi for the Hindi page.
- x-default for the global page, if it is the sensible fallback.
Every page carries the identical set of annotations. If the Hindi page lists the other two but they do not list it, the connection is broken. Using a sitemap-based setup, you place all three alternates under each URL entry, which makes it easy to check the set in one place.
Translation and localisation quality
Hreflang points people to the right page, so the page must deserve them. Good localisation goes beyond translating words:
- Adapt currency, measurements, date formats and phone numbers.
- Use local examples and spellings rather than literal translations.
- Have a fluent person review the text, especially headlines and calls to action.
- Localise images where text or cultural references appear.
- Update legal and contact details for each region.
Machine translation can help produce a first draft, but review it before publishing. See ai for keyword research for related ideas about using AI tools responsibly in international work.
Language selectors and automatic redirects
Avoid forcing visitors into a version based solely on their location or browser language. People travel, use shared devices and may prefer a different language. Offer a clear language or region selector, remember the choice, and let search engines crawl every version without redirects based on IP address. If you suggest a different version, use a dismissible banner instead of an automatic redirect.
Quick implementation checklist
- All alternates are reciprocal and include a self-reference.
- Language and region codes are valid.
- Each URL is indexable, returns 200 and has a self-referencing canonical.
- An x-default entry points to the fallback or selector page.
- New pages are added to the set when they are published.
- The set is audited each quarter and after every migration.
When hreflang is not the right tool
Sometimes teams add hreflang to fix a problem it cannot solve. If two pages are not equivalents, if one is only a thin translation, or if you simply want to prevent a page from being indexed, other methods are better. Use canonical tags to consolidate true duplicates, noindex to keep pages out of results and good local content to earn visibility in a market. Hreflang is a routing hint between equivalent versions, nothing more, so keep the set tidy and expect modest, steady benefits.
Testing and monitoring
Crawl the site with a tool that audits hreflang, and review the reports for missing returns, invalid codes and non-canonical targets. In Google Search Console, check indexing for each version and compare impressions by country. A sudden drop in one market after a change often points to an annotation error.
Do not forget content quality. Translate with care, adapt examples, units and currencies, and add local contact details where appropriate. Hreflang only routes users; it cannot fix a poor translation. If you are planning an international rollout and want help structuring it, send a short brief with your markets and languages.
Frequently asked questions
Does hreflang improve rankings?
Not directly. It helps search engines show the correct language or regional version to the right users, which can improve relevance and user experience.
Do I need hreflang for different English-speaking countries?
Only if your content, pricing or terminology differs. If the pages are identical, a single English version may be enough.
What is x-default?
It marks the fallback page for users who do not match any specified language or region, often a language selector or the main international version.
Can I use hreflang with a single-language site?
There is no need. Hreflang is for sets of equivalent pages in different languages or regions.
Related articles

SEO7 min read
Duplicate Content SEO: Find It, Fix It, Prevent It
Duplicate content SEO explained: what counts as duplication, common causes, how to find it and the right fixes, from canonical tags to redirects.

SEO7 min read
Ecommerce Category Page SEO: Rank and Convert Better
A practical guide to ecommerce category page SEO: keyword mapping, page copy, filters, internal links, structured data and metrics that show what works.

SEO7 min read
Featured Snippets Guide: Win Position Zero Responsibly
A featured snippets guide covering paragraph, list and table formats, how to find opportunities, how to write snippet-ready answers and how to measure the effect.
