Hreflang Tag Generator
Running a site in multiple languages or regions? Hreflang tags tell Google which URL to show which audience, preventing the wrong-language page from ranking. Add your language and region URLs below and copy the complete set of tags.
<link rel="alternate" hreflang="en" href="https://example.com/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />How to use the hreflang tool
- 1Enter each language-region code and its URL.
- 2Add an x-default URL for unmatched audiences.
- 3Copy the tags into every alternate page's <head> (or your sitemap).
- 4Make the tags reciprocal - each version must list all the others.
Frequently asked questions
What is an hreflang tag?
An hreflang tag tells search engines which language and region a page targets, so Google serves the right version to each searcher. It's essential for sites with multiple language or country variants.
What format should the hreflang value use?
Use an ISO language code (e.g. en), optionally with a region (e.g. en-gb). The language comes first, then an optional country - never a country on its own.
What is x-default?
x-default is the fallback shown to users whose language or region you don't explicitly target. It usually points to a language selector or your primary global page.
Do hreflang tags need to be on every page?
Yes, and they must be reciprocal - each language version must list all the others, including itself. Missing return tags are the most common hreflang mistake.
Where do hreflang tags go?
In the <head> of each page, in your XML sitemap, or as HTTP headers. Pick one method and apply it consistently across all alternate pages.
More free SEO tools
Skip the manual work - let Spook rank you
These tools help with the pieces. Spook does the whole job: it finds winnable queries, writes the articles, and publishes them on autopilot.