Hreflang Tag
Generator
Tell search engines which language and region each version of your page is for.
Add a row for each language or country version with its full URL, choose HTML tags or XML sitemap format and copy the result. Put the same complete set on every version, including a self-reference, and consider an x-default row for everyone else.
Your language versions
Your hreflang code
Every version must list all versions, including itself, and each page must link back to the others. If the tags do not match on both sides, search engines may ignore them. For XML sitemaps, add xmlns:xhtml="http://www.w3.org/1999/xhtml" to the urlset tag.
How hreflang works
Hreflang tells search engines that several pages are versions of the same content for different languages or regions, so each visitor is shown the right one. It does not translate anything and does not boost rankings by itself.
- Use language codes such as en or hi, optionally with a region such as en-US.
- Each version must list all versions, including itself.
- Pages must link back to each other. One-way links are ignored.
- Add x-default for a fallback page.
Read the plain-language guide to hreflang, or see our multi-language website development and international SEO.
Frequently Asked
Do I need hreflang?
Only if you have separate pages for different languages or regions. A single-language site does not need it.
What is x-default?
A fallback version for visitors whose language or region you have not targeted, often a language selector or your main page.
Should I use HTML tags or a sitemap?
Either works. HTML tags suit small sites. Sitemap entries are easier to manage when there are many pages. Use one method, not both.
Why does every page need a self-reference?
Because each version should list the complete set, including itself. Missing or one-way links can cause the tags to be ignored.
Need Help Putting This
Into Practice?
Tell us what you need. We reply with an honest recommendation and a clear plan.