Hreflang tags are small lines of code that tell search engines, "this page also exists in these other languages, and here are the addresses." Google uses them to show each searcher the version that best matches their language and region, for example sending a Bengali-speaking user to your Bengali page rather than the English one.
The Hreflang Tag Generator from BISCS India builds the tags for you. List every language version of a page, add an x-default fallback, and it produces both HTML head tags and XML sitemap entries, with checks for the mistakes that most often break hreflang.
When do you need hreflang?
You need hreflang only when the same page exists in more than one language or regional version. Typical Indian examples:
- A government-services explainer site in English, Hindi and Bengali.
- An ed-tech platform with course pages in English, Tamil and Telugu.
- A business with separate pages for India (prices in ₹) and the UAE (prices in AED).
- A news or recipes site translating its articles into several Indian languages.
You do not need it for a single-language site, for pages that are merely similar, or for automatic browser translation.
How hreflang codes work
Each version gets a code made of a language and, optionally, a region:
| Code | Meaning | When to use it |
|---|---|---|
en |
English, any region | One English version for everyone |
en-IN |
English for India | Separate English pages for India and other countries |
hi or hi-IN |
Hindi | Hindi version of the page |
bn-IN |
Bengali for India | Bengali for Indian readers (Bangladesh would be bn-BD) |
ta, te, mr, gu, kn, ml |
Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam | Regional language versions |
x-default |
Fallback | Users who match none of the listed versions |
Languages use two-letter ISO 639-1 codes and regions use two-letter ISO 3166-1 country codes. A region on its own, such as IN, is not valid. The generator offers more than a dozen languages, including Hindi, Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Punjabi, Odia, Assamese, Urdu and Nepali, combined with regions such as India, the US, the UK, the UAE, Singapore and neighbouring countries.
How to generate hreflang tags
- Open the Hreflang Tag Generator. An English, Hindi and Bengali example is pre-filled so you can see the format.
- For each version of the page, choose the language and region from the dropdown and enter its full URL.
- Use Add version for more languages and the bin icon to remove one. Include the page you are currently on as well.
- Keep Add x-default ticked and enter the x-default URL, usually your main English page or a language-picker page.
- Read the checks. The tool warns about relative URLs, invalid codes, duplicate codes, the same URL used for two languages, and sets with fewer than two versions.
- Copy the HTML head tags, or copy the XML sitemap entries if you manage hreflang through your sitemap.
- Place the same complete set on every version of the page.
Everything is generated in your browser; nothing is sent to a server.
Head tags or sitemap: which method?
Both methods are supported by Google; choose one and use it consistently.
Head tags suit small sites. Each language version carries the full set of link rel="alternate" lines in its <head>. They are easy to check by viewing the page source.
Sitemap entries suit larger sites with many pages and languages. Each URL in the sitemap lists all its alternates using xhtml:link elements. Remember to add the xmlns:xhtml="http://www.w3.org/1999/xhtml" namespace to your urlset. You can create the base sitemap with the XML Sitemap Generator and add the hreflang entries from this tool.
If you use both, they must say exactly the same thing.
What a complete set looks like
Suppose a coaching institute has an admissions page in three languages: https://www.example.com/admissions/ in English, /hi/admissions/ in Hindi and /bn/admissions/ in Bengali, with the English page as the fallback.
Each of the three pages carries the same four lines: one alternate link for en-IN, one for hi-IN, one for bn-IN and one for x-default pointing to the English page. The Hindi page lists itself, the English page and the Bengali page, exactly like the other two. That symmetry is what search engines look for; if any page is missing a line, Google may ignore the relationship for that pair.
Common hreflang mistakes
- Missing return links. If the English page points to the Hindi page, the Hindi page must point back to the English page. Every version should carry the full set, including itself.
- Relative URLs. Always use absolute
https://addresses. - Wrong codes.
inis not India (it is an old code for Indonesian),en-UKis invalid (useen-GB), and a country alone is not allowed. - Pointing to redirected or noindex pages. Every URL in the set should be live, indexable and canonical.
- Canonical conflicts. Each language version should have a self-referencing canonical, not one pointing to the English page.
- Machine-translated thin pages. Hreflang helps users find the right version; it does not make poor translations useful. Have a fluent speaker review important pages.
Tips for multilingual sites in India
Use a clear URL structure such as /hi/ and /bn/ folders, so versions are easy to manage. Set the correct lang attribute in each page's html tag; the Meta Tag Generator lets you pick Indian languages for its language setting. Translate titles and meta descriptions as well as body text, since searchers see those first.
After publishing, inspect a few pages in Google Search Console and check that each version is indexed. Whenever you add a language or a new page, regenerate the set with the Hreflang Tag Generator and update every version together.