Hreflang tag generator
Enter each version of a page with its language and its URL. You get the tags ready to copy into your HTML, your sitemap or the HTTP header, and it warns you about the most common mistakes.
It runs in your browser: what you type isn’t sent anywhere and isn’t saved.
This is a made-up example of a Swiss website in four languages. Replace it with your own URLs.
Check
HTML tags (in the <head>)
XML sitemap
HTTP header (Link)
How to use it
- Add a row for each version of the page: the language code (de, fr, it, en) or the language and region code (de-CH, fr-CH), and its full URL.
- Choose the default version (x-default): the one people see if they don’t match any of your languages.
- Copy the result in the format your website uses. The same tags go on every version, each one also pointing to itself.
Bear in mind
- Each version must link to all the others and to itself. If a page doesn’t link back, Google may ignore the pair.
- Use full URLs, with https://, that respond with a 200, not with a redirect.
- The region code comes after the language: de-CH is German for Switzerland. “CH” on its own isn’t valid, and for the United Kingdom the code is GB, not UK.
- Use a single method: HTML tags, sitemap or HTTP header. Mixing them doesn’t help and makes checking harder.
Google Search Central: tell Google about localized versions of your page
In Arrampa
- SEO auditChecks your site rule by rule, hreflang included.
To understand it in depth
- Hreflang step by stepHreflang is an annotation that tells Google which pages are versions of the same page in other languages or regions. It works if each version lists all of them, itself included, and they all link back to each other. Here is how to do it on a Swiss website and how to check it’s right.
- SEO for a multilingual website in SwitzerlandA multilingual website ranks in Switzerland when each language has its own URL, copy written for that region and keywords researched in that language. The versions are linked with hreflang and measured separately. Here is the method, with what Google and Bing say.
- German for Switzerland or for GermanyIf your customers are in Switzerland, write in Swiss Standard German: no “ß”, the words people use here and prices in francs. A separate de-DE version only pays off if you also sell in Germany and have demand there. This guide explains the differences that matter for SEO and how to mark them up.
Glossary terms
- HreflangThe annotation that tells Google which version of a page belongs to each language and country.
- x-defaultThe hreflang value that says which version to show when no language or country on the list matches the user.
- Language and region codesThe value that identifies a page’s language and, if needed, its country: de-CH is German for Switzerland.
- Canonical tagA line of code that tells Google which is the main address of a page when copies exist.
Other free tools
- Google search previewHow your title and description will look in the results, with their length.
- Robots.txt checkerPaste your robots.txt and see which crawlers can read each URL, AI crawlers included.
- Local business structured dataThe LocalBusiness JSON-LD block for your business, checked and ready to copy.
- URL generator by languageFrom a title to a clean URL in each language: no accents, no ä or ç, and no filler words.
Want to know when we open?
One email to confirm and one on the day we open. Nothing else.