Free Hreflang Tag Generator

Generate hreflang tags for a page published in several languages, including the self-reference and x-default that are easy to forget.

Every page in the set must list every other page, including itself. Enter this page and the tool adds its self-reference for you.
Pick the bare language unless you genuinely publish a separate page per country. "es" serves every Spanish speaker; "es-es" serves only Spain, and needs an es-mx to go with it.
Optional. Where to send anyone whose language you do not have a version for.

Other Language Versions

One row per translation. Leave out this page - its own tag is added automatically.

Sortie

Your Hreflang Tags:

SEO Audit Any Site in Seconds
+ Comprehensive SEO / GEO Tools for Every Function

Run over 100 checks on your website across On-Page SEO, Usability, Performance, Social and Links. Now with GEO in every report. SEOptimer also offers keyword research, rank tracking, backlinks and a full site crawler.

About Hreflang Tags

What hreflang tags do

Hreflang tags tell search engines that several pages are the same content in different languages, and which one to show to whom. Without them the versions compete, and the wrong one turns up for the wrong audience.
They are also the fix for a duplicate content problem you did not know you had: two English pages for the UK and the US are near-identical, and hreflang is what explains why both exist.
This generator builds the set for one page, including the parts that are easy to forget.

The rules that catch people out

  • Every page in a set must list every page in the set, including itself.
  • The references have to be reciprocal. A page that is listed but does not list back is ignored.
  • Language first, region second: en-gb, not gb-en, and never a region on its own.
  • Use absolute URLs.
  • x-default is for anyone whose language you do not cover, and is worth setting.
The self-reference is the single most common omission, and it invalidates the whole set rather than just the one entry.

Common mistakes

  • Invented codes. It is en-gb, not en-uk, which is not a valid region.
  • Hreflang pointing at one URL while the canonical on that page points somewhere else.
  • Listing a URL that redirects, or that no longer exists.
  • Adding hreflang between pages that are not actually the same content.
  • Maintaining a large set by hand, which is where the reciprocal errors creep in.

Does hreflang still matter in 2026?

For any site publishing in more than one language or targeting more than one country, yes. Nothing has replaced it, and the failure mode is unchanged: your Spanish page ranks for English searchers, who bounce.
It matters for assistants too, since they need to know which version to draw from for a given audience, and the tags are the clearest statement of that available.
The one thing hreflang does not do is help a page rank that would not otherwise. It sorts out which of your pages is shown, not whether any of them is.

Using the hreflang tag generator

Enter this page and its language, add a row for each translation, and the self-reference is added for you. Paste the result into the head of that page.
Then repeat for each other page in the set, listing the same URLs. It is repetitive by design - the reciprocity is what makes it work.

Where to go next

Check the tags once live with the hreflang checker, confirm each page declares the right HTML lang attribute, and make sure the canonical tag on each version points at itself rather than across languages.

Comprehensive SEO Toolbox with over 55 Tools

Check Titles, Meta Descriptions, Headings, Schema, Core Web Vitals, SSL and Robots.txt. Generate Meta Tags, Sitemaps and .htaccess Rules, minify CSS, JS and HTML, and draft copy with our AI Writing Tools - instantly and for free.

Further Reading

Voir plus
Hreflang Ultimate Guide - Qu'est-ce que c'est ?
Description   Le code Hreflang est un code qui signale à votre ordinateur la langue de votre article. Il permet de donner la priorité...
Multilingual SEO: How to Optimize Your Site for Any Language
Multilingual SEO opens up your website to millions—or even billions—of new potential customers. You know the rush you get when you're r...
International SEO: 4 Challenges You Need to Overcome
It's a small world when it comes to SEO. With just a few clicks, you can reach new customers in every country. In fact, tapping into in...
When to use Localized Domains, and their SEO Impacts
Does Domain Localization Help My SEO?   Over the last few years, we have seen the rise of local SEO. Here are local SEO stats by Soc...
Canonical URLs: Why They Are Important & How to Use Them
Canonical URLs help webmasters solve the problem of duplicate content issues.    Knowing how to implement them correctly is essentia...