Hreflang Tag Generator
Tell Google which language and region each version of a page targets. Pick a language, add a region and URL, and get clean hreflang link tags ready to paste — with live checks for duplicates and missing absolute URLs.
What hreflang does and why it matters
When you publish the same content for different languages or countries, search engines need to know which version to show which user. hreflang annotations solve that: each tag pairs a language (and optionally a region) with the URL of the matching page, so a reader in France sees the French page and a reader in Canada sees the Canadian one.
The code follows the standard: a two-letter ISO 639-1 language subtag, optionally joined to an ISO 3166-1 alpha-2 region subtag — for example en, en-GB or fr-CA. Add an x-default entry to point search engines at a fallback page when no other version fits. This tool builds those tags as you type and flags two of the most common mistakes: duplicate language/region codes and relative URLs (hreflang requires full, absolute URLs).
It all runs locally in your browser — no data is uploaded. Remember that hreflang must be reciprocal: every page you reference should point back, and ideally include a self-referencing tag too.
Common hreflang pitfalls
Relative URLs
hreflang only accepts absolute URLs starting with http:// or https://. The tool warns you the moment a relative link sneaks in.
Wrong region codes
The language comes first, the country second — en-GB, not gb-EN. Use UK as a language? No — the country code for the United Kingdom is GB.
Missing return tags
If page A links to page B, page B must link back to A. One-way annotations are ignored by Google.
Frequently asked questions
Paste them into the <head> of each page in the set. The same block of tags should appear on every language/region version, including a self-referencing entry. They can also be served via an XML sitemap or HTTP header, but head tags are the simplest.
It’s optional but recommended. The x-default tells search engines which page to show when none of your specific language/region versions match the user — typically a language selector or your primary market page.
Yes. Leave the region empty to target a language everywhere it’s spoken, for example es for all Spanish speakers. Add a region only when you genuinely serve a country-specific page.
Running an international site?
Get a free SEO audit
International SEO has plenty of moving parts beyond hreflang. We’ll review your setup and show your Manchester business how to rank in the right markets without cannibalising yourself.
[email protected]