We use essential cookies to keep you signed in and protect forms. We also use analytics to count visits and see how pages are used. Ads on our free tools may set cookies to show and measure ads. Cookie notice
Hreflang Tag Generator
Tell search engines which page to show to which language. Tags are created on your device.
Your files stay with you. Your files never leave your browser. This tool runs on your device: nothing is uploaded to our servers, so there is nothing for us to store or see.
How to use it
1List each language version as a code and URL, one per line.
2Add an x-default line for everyone else.
3Choose HTML, sitemap or header output and place it on every version.
Where it helps
English and Hindi sites
Show Hindi pages to Hindi searchers and English to others.
Multiple countries
Serve India and Gulf customers their own pages.
Translated product pages
Avoid translations competing with each other.
Good to know
Stays in your browser
What you type is processed on your device and never sent to our servers.
How do you set up hreflang for a website in several languages?
List each language version as a code and URL, one per line, such as en-IN and hi-IN, add an x-default line for everyone else, then choose HTML tags, sitemap entries or HTTP headers. Place the output on every version, because each page must list all versions, including itself.
en-IN, hi-INLanguage-country codes.
x-defaultFallback.For everyone else.
3 outputsHTML, sitemap, headers.Your choice.
0Data sent.In your browser.
What is hreflang?
Hreflang is a set of tags that tells search engines which version of a page is meant for which language and, optionally, which country. It helps Google show a Hindi page to Hindi searchers and an English page to English searchers, instead of guessing. Each version needs tags.
What do the language codes look like?
A two-letter language code such as en or hi, optionally followed by a country code, like en-IN or hi-IN. Use x-default for the fallback page shown to everyone who doesn't match a listed language. Codes must be valid, or the tags are ignored. Check codes carefully.
Do all versions need the tags?
Yes. Every version must list all the versions, including itself, and the links must point back to each other. If the English page lists the Hindi page but the Hindi page doesn't list the English one, search engines ignore the pair. Copy the same block everywhere.
Is hreflang a ranking boost?
No. It helps show the right version to the right visitor and avoids duplicate-content confusion between translations. Rankings still depend on each page's content and links. Think of hreflang as directions, not as a way to rank higher. Good translations still matter most. Translations still need quality.
Which output should I choose?
HTML tags in the page head are simplest for small sites. Sitemap entries suit larger sites with many pages. HTTP headers work for non-HTML files such as PDFs. Pick one method per page and use it consistently. HTML suits most small sites. Don't mix the methods.
What is x-default?
x-default marks the page to show when no listed language matches the searcher, often a language picker or your main English page. It's optional but recommended, so visitors from other languages land somewhere sensible. It also catches visitors whose language you haven't listed at all.
Do I need hreflang for an English-only site?
No. Hreflang is only useful when you have the same content in more than one language or for more than one country. A single-language site doesn't need it, and adding it adds nothing. Start using it only when you publish a second language. Add it later if needed.
Can I use hreflang for India and the Gulf?
Yes, if you have separate pages for each, for example en-IN for India and en-AE for the UAE, with different prices or contact details. If the pages are identical, you don't need country-specific versions. Each version should then have its own prices or contact details.
Is anything I type sent to your server?
No. The tags are generated in your browser from the codes and URLs you enter, so your site structure stays on your device. Copy the output into your own website or sitemap. Nothing is stored, and you don't need an account to use it. No account is needed.
Why are my hreflang tags being ignored?
Common causes are missing return links, invalid language codes, URLs that redirect or aren't canonical, and pages blocked from crawling. Check that every version lists every other version with the exact final URL. Search Console reports hreflang errors to help you find them. Search Console flags these errors.
Does Google need hreflang to show Hindi pages?
Google can often work out a page's language on its own. Hreflang makes the relationship between translations explicit, which helps when pages are similar, such as the same product in English and Hindi. It's worth adding once you publish real translations. It removes the guesswork.
Should translated pages be machine translated?
Machine translation can be a starting point, but have a fluent speaker review it. Poor translations read badly and can hurt trust. Hindi and Marathi pages should sound natural to local readers, especially for service businesses. Readers notice quality. Readers notice awkward phrasing quickly. Budget for review.
Where do the HTML tags go?
In the head section of every language version, as link tags with rel=alternate and the hreflang code. The same set of tags goes on each version, listing all of them. Every version shows the same block, including a link to itself. Use complete https:// addresses.
Does it work on a phone?
Yes. Enter the codes and URLs and copy the output on your phone. Adding it to your site is usually easier from a computer, especially for sites with many pages. Nothing is uploaded, and you don't need an app or an account to use it on your phone.
Is it free?
Yes. The hreflang tag generator is free, with no sign-up and no limit. It's one of the free SEO tools from Marketiism, useful for businesses publishing pages in English and Indian languages. Nothing is added to the code or text it produces, and you can use it for client and business work as often as you like.
Want this inside your own account?
Marketiism keeps your invoice numbers, GST reports, UPI payment links and WhatsApp reminders in one place. Leave your details and we'll call to set it up for your business, or start the trial yourself.