Free Tool
Hreflang Tag Generator
If your site has pages in more than one language or region, hreflang tags tell Google which version to show to which visitor — and stop your translated pages from competing with each other. Add your versions below and copy a valid set of tags.
Language codePage URL
The fallback page shown when no language matches. Usually your main / English homepage. Leave blank to omit.
hreflang tags
<link rel="alternate" hreflang="en" href="https://example.com/" /> <link rel="alternate" hreflang="es" href="https://example.com/es/" /> <link rel="alternate" hreflang="de" href="https://example.com/de/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />
Paste these into the <head> of every page in the set — each version must list all the others, including itself. Alternatively, serve them via HTTP headers or your XML sitemap.
Hreflang rules that trip people up
- Return tags must match. If page A points to page B, page B must point back to A. Missing return tags are the most common hreflang error.
- Self-reference is required. Each page's tag set must include a tag pointing to itself.
- Use absolute URLs. Always include the full
https://URL, not a relative path. - Language first, region optional.
enis valid;en-GBtargets English speakers in Great Britain. Region alone (GB) is not valid. - Add x-default for a catch-all page when no language fits the visitor.
