hreflang attribute country cheat sheet
7 basic questions you’ve always wanted to ask? what is hreflang attribute used for?
The hreflang attribute is very often misinterpreted and misunderstood. Today we will go through the facts exclusively, answering the most frequently asked questions.
Hreflang is a fairly simple SEO tool that allows you to get rid of the ambiguity on a multilingual site and assign a specific region to each set of pages.
For example, you have a web page for Russian-speaking users and exactly the same pages in English, German, French. Hreflang allows you to specify which specific region each of them is for.
Problems only arise when experts misinterpret the specification, or when your web infrastructure is not unified in a way that makes matching easier.
hreflang attribute Language Cheat Sheet[table id=7 /]
In this article, we’ll tackle some of these common problems and misinterpretation of the spec by finding answers to 7 simple about hreflang attribute but frequently asked questions.
1. I have a website in English that is for the US, UK, and Ireland. Can I use “Hreflang = en-us-gb-ie”?
Answer: No, you cannot. I understand that you are creative and want to get better.
If you have the same set of pages for several English-speaking countries, you can use a simple design without
<link rel = ”alternate” hreflang = ”en” href = ”https://www.moomez.com/en/page.html” />
In the case of different sets of pages for different English-speaking regions (eg Australia and Singapore), you need to set specific target countries. To do this, create a separate line for each country, even if the URL is the same for everyone.
<link rel = ”alternate” hreflang = ”en-ie” href = ”https://www.moomez.com/en/page.html” />
<link rel = ”alternate” hreflang = ”en-gb” href = ”https://www.moomez.com/en/page.html” />
<link rel = ”alternate” hreflang = ”en-us” href = ”https://www.moomez.com/en/page.html” />
2. I have one site for all European countries and another for the entire Middle East. Can I use “EU” and “ME” as a country setting in hreflang?
<link rel = ”alternate” hreflang = ”en-EU” href = ”https://www.moomez.com/en/page.html” /><link rel = ”alternate” hreflang = ”en-ME” href = ”https://www.moomez.com/en/page.html” />
Answer : Only valid International Organization for Standardization (ISO) country codes and languages can be used in the hreflang tag. There are no EU, EMEA, APAC, or ME area codes.
Many companies have regional sites targeting Latin America (LatAm), the European Union (EU), or the Middle East (ME), which represent several countries with different languages in the region but try to use the same “common” code for the entire region …
The most common mistake here is trying to use es-LA to represent the Spanish language site in Latin America. Unfortunately, such a “trick” will not work, since you tell the search engine that it is Spanish, targeting the country of Laos.
3. Can I combine canonical and hreflang tags on one line?
<link rel = ”canonical, alternate” hreflang = ”en-gb” href = ”https://moomez.com/en-uk/page.html” />
Answer: No, you need to separate the canonical tag from the hreflang tags.
<link rel = ”canonical” href = ”https://moomez.com/en-uk/page.html” />
<link rel = ”alternate” hreflang = ”en-gb” href = ”https://www.moomez.com/en-uk/page.html” />
<link rel = ”alternate” hreflang = ”en-us” href = ”https://www.moomez.com/en-us/page.html” />
If your technical SEO or a developer wants to get creative, recommend that they study the hreflang spec (Yandex , Google ) and not deviate from the standard syntax, as this tag is quite complex.
4. We use CMS to automatically generate XML sitemap files. It includes non-existent URLs. Can this be allowed? I see them in GSC bug reports. This is bad?
Answer : Yes, this is bad. This is a serious problem for many companies.
The problem is caused by the CMS set to automatically generate URLs for each language or country when a new page appears on the site. Sometimes these URLs are generated according to general navigation rules, even if the page itself is not there.
Unfortunately, there is no easy way to deal with this problem. Non-existent URLs should not be included in the XML sitemap.
The actual solution depends on your CMS. Start by looking at the rules for creating URLs (parent and child). Or from the rules for generating pages for regions. In most cases, they are not properly tuned.
5. Do I need to use hreflang to manage content hosted on different domains, each targeting a different country?
Answer : Many companies have separate websites for different countries or languages. In this case, using hreflang for multiple domains (and subdomains) is not an easy task.
You need to use hreflang XML sitemaps that list all the URLs for each of the unique domains. And it would be better if the URL paths are the same. Or at least not very different. Otherwise, comparing them will turn into a difficult task.
For simplicity, it is usually recommended to use splitting of large sitemaps, and also to concentrate all XML map files on one site, in the root directory, instead of having to struggle with dozens or hundreds of domains.
6. Should I use a specific URL or home page as the x-default?
Answer : There is always a lot of confusion about x-default.
X-default is a directive to use a specific page for any language or region that does not have a separate hreflang rule.
What to show to users who don’t have a local version? In this case, many companies display a global version of the site or a version in English. Note that only one of these can be defined for x-default.
If you set the home page as x-default for pages other than the home page, search engines will think that it should be shown instead of any other pages in regions that are not listed in the hreflang tags. And you won’t be able to dynamically switch this rule based on the visitor’s IP.
Yes, it has been tested in practice. No, it doesn’t work, not at all.
7. I have content in two different languages within one page of the site. Can I write both for it in the hreflang tag?
Answer: Each page should only contain content in one language. However, different languages are common on UGC sites. As a general rule, you should set the primary language region or the default region.
For example, if your site is initially aimed at a Russian-speaking audience, but on some page, there is a lot of content generated by users in Ukrainian, the region should be “UA”.
Let’s sum up of What is hreflang attribute used for
Hopefully, this article has shown you that the hreflang tag is not overly complicated. As a rule, difficulties arise with it due to the confusing architecture of the website.
Start with a couple of languages or two groups of pages, and test everything properly. After you see the return, you can clearly demonstrate to the management (or yourself) the importance of allocating resources for a larger implementation of multilingualism.