Hreflang tag generator
Build valid, reciprocal hreflang annotations for your international site - as HTML tags, sitemap entries, or HTTP headers, with x-default and live validation.
Language versions
x-default tells search engines which page to serve when no language matches.
3 alternates
<link rel="alternate" hreflang="en" href="https://example.com/" /> <link rel="alternate" hreflang="fr" href="https://example.com/fr/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />
Place this full set of tags in the <head> of every listed page (each page must reference all alternates, including itself).
Valid hreflang set with 3 alternates (including x-default).
Don't forget reciprocal tags
hreflang must be reciprocal: every page in the set must link to all the others (and itself). If your English page points to the French one, the French page must point back - or Google ignores the annotations. The set above is the full reciprocal block to place on every listed page.
Launching a multilingual site?
International SEO is easy to get subtly wrong. We build multilingual sites with correct hreflang, sitemaps, and structure from the start.
Talk to an engineerQuick answer: Hreflang tags tell search engines which language and regional version of a page to serve to which users. This generator builds valid, reciprocal hreflang markup - as HTML link tags, XML-sitemap entries, or HTTP headers - including the x-default tag, so Google serves the right page to the right audience and you avoid duplicate-content issues.
The three ways to implement hreflang
| Method | Best for |
|---|---|
| HTML link tags | Most sites; simple to add to each page's <head> |
| XML sitemap | Large sites; keeps markup off the page and scales well |
| HTTP Link header | Non-HTML files like PDFs |
Pick one method per set of URLs - don't mix HTML tags and sitemap entries for the same pages.
Language & region code examples
| hreflang | Targets |
|---|---|
| en | English speakers, any region |
| en-US | English speakers in the United States |
| en-GB | English speakers in the United Kingdom |
| fr-CA | French speakers in Canada |
| x-default | Fallback when no language matches |
Language uses ISO 639-1 (2 letters); region uses ISO 3166-1 Alpha-2 (2 letters). Language is required, region is optional.
The most common hreflang mistakes
- Missing return (reciprocal) tags - every page must reference all the others, or Google ignores the set.
- Wrong codes - using a country code as a language (e.g. "uk" for Ukrainian, which is actually "ua" region / "uk" language is Ukrainian - easy to confuse) or inventing codes.
- No x-default - leaving users with no fallback when their language isn't covered.
- Relative URLs - hreflang requires absolute, fully-qualified URLs.
- Non-canonical targets - hreflang URLs should be self-canonical, not pointing at a different canonical.
Frequently asked questions
- What are hreflang tags?
- Annotations that tell search engines which language/region version of a page to serve, preventing duplicate-content issues.
- What is x-default?
- The fallback version shown when no language/region matches the user - often a selector page or your global version.
- HTML, sitemap, or HTTP header?
- All valid - pick one. HTML for normal pages, sitemap for scale, HTTP header for non-HTML files.
- Do tags need to be reciprocal?
- Yes - every page must link to all others including itself, or the annotations are ignored.
- Which codes does hreflang use?
- ISO 639-1 language (en, fr) optionally with ISO 3166-1 Alpha-2 region (en-US, fr-CA).
Related tools
Related free tools
Keep going with these tools
XML Sitemap Generator
Paste URLs, get a valid sitemap.xml
Robots.txt & AI Crawler Checker
Control GPTBot, Google-Extended & more
Structured Data Checker
Validate schema & rich results
SERP Snippet Preview
See your page in Google before you publish
DNS Lookup & Checker
Check any domain's DNS records instantly
Domain Age & WHOIS Checker
How old is any domain?
Want a team to handle it for you? We design and build fast, SEO-ready websites that convert. Explore AI web development.
Related guides
Go deeper with our guides
Practical, up-to-date guides on the strategy, costs, and execution behind this tool.
Technical SEO Checklist for Small Business Websites in 2026
Fix the technical SEO issues holding your site back: crawlability, indexation, site speed, and schema markup.
Small Business SEO Guide 2026: Strategy and Execution
An SEO framework for small businesses in 2026, from technical foundations and content planning to local visibility and tracking.
Ready to ship your next product?
Tell us what you're building. Senior engineers will scope, plan, and start delivering your product with production-ready architecture - fast.
