Hreflang Tag Generator
List each language or region version of a page and get the full reciprocal set of hreflang link tags, including x-default, as HTML for the head or as an XML sitemap block. Language and region codes are validated as you type.
- Instant·Runs in your browser
- No signup
- Free
Versions
| Lang | Region | URL | x-default | |
|---|---|---|---|---|
1<link rel="alternate" hreflang="en" href="https://yoursite.com/" />2<link rel="alternate" hreflang="en-GB" href="https://yoursite.com/uk/" />3<link rel="alternate" hreflang="fr" href="https://yoursite.com/fr/" />4<link rel="alternate" hreflang="x-default" href="https://yoursite.com/" />Checks
Paste the same complete set into every language version, including itself.
3 versions, all reciprocal, x-default set
Next step
Tools that pair with this one
- InstantSchema Markup GeneratorJSON-LD for 10 schema types, with field-level guidance.Schema & tagsOpen
- InstantOpen Graph & Social Tags GeneratorMeta tags plus a live preview for X, LinkedIn and Slack.Schema & tagsOpen
- InstantXML Sitemap GeneratorTurn a list of URLs into a valid sitemap.xml.Schema & tagsOpen
How to use it
- 1Add one row per version: language code, optional region, and the URL.
- 2Choose which URL should be the x-default fallback.
- 3Switch between HTML link tags and sitemap XML output.
- 4Paste the same complete set into every language version of the page.
Frequently asked
What is hreflang?
An attribute that tells search engines which language and region each version of a page targets, so a French searcher gets the French page instead of the English one. Every version must list all the others, including itself.
What is x-default?
The version to show when no language matches. Usually your language selector page or the English version.
Which codes are valid?
ISO 639-1 language codes (en, fr, de) optionally followed by an ISO 3166-1 alpha-2 region (en-GB, fr-CA). Region alone (just GB) is invalid, and so are three-letter codes like eng.
Want this on autopilot?
Enter your site to see how often ChatGPT, Perplexity, Gemini, and Google cite your brand, and exactly what to publish next.
No credit card required · Free 7-day trial
