🌍

Hreflang Tag Generator

Generate correct hreflang tags for any number of languages and regions. Bidirectional validation built-in, catches the most common hreflang mistake before deploy.

Hreflang Tag Generator
Add one row per language version. The generator outputs the correct hreflang HTML, validates ISO codes, and confirms the bidirectional return-tag pattern.
What it does

The only hreflang generator that catches the bidirectional mistake

Hreflang is the most commonly broken international SEO signal, and the most invisible. Your pages still rank, but Google serves the wrong language version to the wrong country, and you don't notice for months.

The fatal mistake: hreflang is bidirectional. If your English page links to your French page with hreflang="fr", the French page MUST link back to the English page with hreflang="en". Skip the return reference and Google ignores BOTH tags. This generator validates the bidirectional return for every page-pair, every time.

How to think about hreflang

How hreflang actually works (in 3 sentences)

Hreflang tells Google: "this page exists in these other language and country variations." Google uses it to serve the right variant to the right user based on their language and location. It's NOT a ranking signal, it's a serving signal.

Language vs language-region

Use 2-letter language codes (en, es, fr) when you have one global version per language. Use language-region (en-GB, en-US, es-MX, es-ES) when content differs by country, pricing, currency, shipping. Don't mix the two on the same page-set.

Always include x-default

Add hreflang="x-default" pointing to your fallback page (usually English homepage). This catches users whose language doesn't match any of your variants, without it, Google guesses, often badly.

Where to put hreflang

Three valid places to put hreflang, pick one

  1. In the HTML <head> as <link rel="alternate" hreflang="…" href="…"/> tags. Most common. Easy to debug. The generator outputs this format.

  2. In the XML sitemap as <xhtml:link> elements. Best for very large sites (10K+ pages) where adding tags to every HTML head is wasteful.

  3. In the HTTP response Header for non-HTML content (PDFs, images, downloadable files).

Pick ONE method per site. Mixing methods causes Google to ignore both. Most sites should use HTML head tags for the first 5,000 URLs and switch to sitemap-based hreflang above that.

Frequently asked

FAQs about the Hreflang Tag Generator

When you have content in multiple languages OR multiple country versions of the same language. Single-language sites don't need it. Sites with /en, /es, /fr subdirectories need it. Sites with .co.uk, .com.au, .com country domains usually need it.
Yes. Without hreflang, US users may see your UK page (with prices in GBP), UK users may see your US page. Use hreflang="en-US" and hreflang="en-GB" plus hreflang="x-default" pointing to your global fallback.
lang on the <html> tag is for accessibility (screen readers, browser language detection). hreflang in <link> tags is for search engines to choose the right version. Set both, they don't conflict.
Every page that has translations. The hreflang relationships are page-specific, not site-wide. If only your homepage is translated, only the homepage needs hreflang.
Google ignores the entire tag. "en-uk" is not valid (the country code is GB, not UK). The generator validates against the ISO standard.
Yes. Search Console → International Targeting report shows hreflang errors and missing return tags. Run a check 2 weeks after deploying, most issues surface within that window.
Hreflang is not a ranking signal, it only changes WHICH version of your page Google shows to a given user. Adding hreflang correctly will improve your CTR (right users see right pages) but won't lift your overall rankings.
Beyond tools
Need an audit, not a checker?
These tools spot problems. I solve them. Book a free strategy call, I'll review your site live and give you a prioritised fix list.