What hreflang tags do
Hreflang annotations help search engines understand which pages are language or regional alternatives. For example, a site might have separate pages for English speakers in the United States and the United Kingdom. The tags identify those relationships; they do not translate the content or guarantee that a search engine will show a particular version.
How to use this generator
- Enter a valid language tag and the canonical URL for each version.
- Add every translated or region-specific page that should be an alternate.
- Optionally include an
x-defaultURL for a fallback page. - Generate and copy the tags into the
<head>section of every listed page.
Each version should contain the same set of alternate links, including a link to itself, and every alternate page should link back. Use fully qualified HTTPS URLs when the pages support HTTPS. Choose language-region codes that match the actual content and audience, such as en-GB for British English or pt-BR for Brazilian Portuguese. A language-only code like fr is appropriate when the page targets French speakers across regions.
Check the implementation before publishing
After adding the tags, verify that every URL returns the intended page, that the language codes are correct, and that all versions reference one another. Keep canonical tags consistent with your preferred page URLs. Hreflang and canonical signals solve different problems, so neither should accidentally point all language versions to a single page.
Do hreflang tags need to be reciprocal?
Yes. Each page should reference itself and all its alternates, and those alternate pages should include a link back. This generator creates one set of tags; use that same set on every page in the group.
What does x-default mean?
It can point to a fallback page for visitors whose language is not covered, often a language selector or a general-language landing page. It is optional.
Where should I place these tags?
For this HTML output, place the link elements in the head of each page. Keep the values identical across versions and ensure each referenced URL is accessible.