Language and Region Codes
Use codes like en, fr or en-GB, with suggestions for common languages.
Create hreflang tags that tell search engines which language and region each version of your page is for. Output HTML link tags, XML sitemap entries or an HTTP header.
Language codes are checked for you, with warnings for duplicates, missing x-default and mixed protocols.
Hreflang is an annotation that tells search engines which language and country a page is meant for, and where to find the same page in other languages. It helps show French visitors your French page and UK visitors your UK page, instead of the wrong version.
Every version must list all the others — including itself — and the references must match on both sides, which is why a generator that gives you the full set is so handy.
Use codes like en, fr or en-GB, with suggestions for common languages.
Add a fallback URL for visitors who do not match any version.
HTML link tags, XML sitemap xhtml:link entries or an HTTP Link header.
Spots invalid codes, duplicate languages, bad URLs and mixed http/https.
Add rows for every language or regional version.
Everything is generated in your browser.
Enter a language code and the URL of each version.
Optionally add a fallback page.
HTML, XML sitemap or HTTP header.
Add the full set to every page in the group.
Quick answers about using the MoSanKit Hreflang Tag Generator.
Yes. Each page in the group must list every version, including a tag that points to itself. If page A points to B, then B must point back to A.
It is the fallback page shown when no other language or region matches the visitor. It is often your main or language-selector page.
HTML link tags are the simplest for most sites. Use the XML sitemap format for large sites, or the HTTP header for non-HTML files such as PDFs.
Use a two-letter ISO 639-1 language code, optionally followed by a region, such as en, en-GB, pt-BR or zh-TW. Region alone (like "GB") is not valid.
No. It is only useful when you have several language or regional versions of the same content.
No. It is a hint that helps search engines choose the right version for each user. Quality and relevance still matter.
Explore more free SEO and website tools from MoSanKit.