Free Hreflang Tag Generator
Planning a multilingual site before you tag it
Hreflang is only the final step. Before you generate anything, decide how your languages are organised, because the tags must match your real structure. Common choices are separate folders (/bn/ for Bengali and the main site in English), separate subdomains, or separate domains for each country. Each language version should be a full page in its own right, not an automatic machine translation dropped in with no review. Once the pages exist and are linked to one another, hreflang tells search engines which version belongs to which audience.
A worked example: English and Bengali
Suppose a business has an English page and a Bengali page for Bangladesh. In the tool you add two rows: the English address with the code en, and the Bengali address with bn (or bn-bd if you want to target Bangladesh specifically). Then click Add an x-default row using the first URL, which adds the fallback version for everyone else. It copies the first address in your list, so put the page you want as the fallback, usually the English one, at the top. The generator writes the HTML tags, and you place the whole set in the head of both pages. Each page carries the same list, including a reference to itself.
Language codes and region codes
- A language code is two letters, such as
en,bn,hi,arores. - A region can be added after a hyphen:
en-gbfor English in the United Kingdom,en-usfor the United States,es-mxfor Spanish in Mexico. - Use region codes only when you really have different content for different regions. If one English page serves everyone,
enalone is enough. - The code for the United Kingdom is
gb, not uk.en-ukis wrong and will be ignored.
The return tag rule
This is the rule people break most. If page A says that page B is its Bengali version, then page B must say that page A is its English version. Hreflang works only when the references are confirmed from both sides. One-way tags are ignored. Because of this, you must add the full set to every language version, and when you add a new language you must update all the existing pages too.
Which format to choose
| Format | Where it goes | Good for |
|---|---|---|
| HTML link tags | In the head of each page | Small and medium sites |
| XML sitemap | Inside your sitemap file | Large sites, or when editing page heads is hard |
| HTTP header | Sent by the server | Files such as PDFs that have no head |
Choose one method per page rather than all three, so the signals cannot contradict each other. WordPress translation plugins usually handle hreflang for you, and in that case you do not need to add anything by hand.
Common mistakes
- Pointing to pages that redirect, are blocked or return an error.
- Using relative addresses instead of full https ones.
- Forgetting the self-reference.
- Mixing up language and country codes.
- Tagging pages that are not true translations of one another.
A checklist before you add the tags
- Every language version exists and loads without errors.
- Each page links to the other versions in its navigation, for real visitors.
- The addresses are final, with the same scheme and trailing slash habit throughout.
- You know which version is the x-default.
- You will add the complete set to every page, not only the new one.
Testing after you publish
View the source of each language page and search for the word alternate to confirm that the tags are there and complete. Click every address in the set to make sure it loads and does not redirect. Then watch Search Console for any international targeting or indexing issues over the next weeks. Remember that it can take time for search engines to recrawl all the pages and recognise the connections, so do not judge the result after a day.
Do small sites need it?
If your site has one language and one audience, no. If you publish the same service in English and Bengali, it is worth doing carefully. If you have only a few pages translated, tag just those, and do not tag pages that have no counterpart. Wrong tags are worse than none.
Hreflang is a hint, not a command
Search engines treat hreflang as a strong signal, but it is not a guarantee that the right page will appear for every searcher. It helps most when pages are very similar, such as the same product page in two English-speaking countries. It will not fix thin or poorly translated pages. If you are working on the rest of the head, the meta tag generator covers the search and social tags, and the XML sitemap validator checks a sitemap that carries hreflang entries.
FAQ
It is an attribute that tells search engines which language and region a page is for, and which other pages are its translations.
It is the fallback version shown to users whose language or region does not match any listed version.
No. It is only useful when you have the same content in more than one language or for more than one region.
It does not boost rankings, but it helps the right version reach the right people and reduces duplicate content confusion.
No. The code is generated in your browser.