Hreflang Tag Generator
Hreflang Tag Generator is a free tool that builds language and country tags, telling Google whether to show your Hindi, English or UAE page to each visitor.
- Free
- No sign-up
- Runs in your browser
If your website has the same page in more than one language โ English and Hindi, say โ or separate versions for India and the UAE, hreflang tags tell Google which version to show to whom. This tool builds the tags for your page's <head>, for your XML sitemap, or as an HTTP header, and catches the classic mistakes like en-uk and using โinโ for India.
Your workspace
Add one row for each language or country version of the same page. Every version should carry the same full set of tags, pointing to all the others and to itself.
- Version 1
- Version 2
Languages are two lower-case letters (en, hi, ta, mr, bn). Countries are two capital letters (IN, AE, GB, US). You can also type both together, like en-IN.
Fill in the details above, then press the button to see your result.
Guide
How to use it
- 1Add one row for each version of the page: a language code, an optional country code, and the full address of that version.
- 2Set an x-default page โ the one to show people whose language you have not listed. Usually your main English page.
- 3Fix anything marked in red. Rows with wrong codes are left out of the output until they are fixed.
- 4Choose where the tags will go: the page's <head>, your sitemap, or an HTTP header.
- 5Put the same full set on every version of the page, so each one points to all the others and to itself.
What the results mean
- Language code
- Two letters from ISO 639-1: en for English, hi for Hindi, ta for Tamil, mr for Marathi. Always lower case.
- Region code
- Optional two letters from ISO 3166-1 for a country: IN for India, AE for the UAE, GB for the United Kingdom (not UK). Add it only if the versions differ by country.
- x-default
- The fallback page for everyone who does not match any listed language or country, such as a language chooser or your main site.
- Return link
- Every version must list every other version and itself. If page A points to page B but B does not point back, Google ignores the pair.
Common questions
Do I need hreflang if my site is only in English?
No. Hreflang only matters when the same content exists in more than one language or for more than one country. A single-language site gains nothing from it.
Should I use hi or hi-IN for my Hindi pages?
Use plain hi unless you also have Hindi pages for another country. Adding the region narrows who the page is for; hi-IN is fine, but it is only needed when a second Hindi version targets somewhere else.
Which is better โ head tags, sitemap or HTTP header?
They work equally well, so pick one and stick to it. Head tags are simplest for a small site. The sitemap is easier to manage when you have many pages. The HTTP header is for PDFs and other files that have no <head>.
Is it en-UK or en-GB?
en-GB. The official country code for the United Kingdom is GB, and Google ignores tags with UK. The same kind of mistake happens with India: IN is the country, so English for India is en-IN and Hindi is hi or hi-IN โ never just in.
