Explore What Hreflang Tags Are and How to Use Them Properly
Hreflang can be quite hard to work with, but this article will show how to go with it easy and fast. We are going to explain how to use hreflang in the right way in 7 steps and we hope that you will find our advice handy and efficient. However, there is no exact size-fits-all-solution for hreflang annotations.Check hreflang tags for specific URL
Firstly, let us figured what is it? Hreflang is a technical solution for websites that have the same content in several languages, for example, the user is a resident of France, the page of the site is in the SERP in English, but there is also a French version. What is your goal? You need to make sure that this particular Google user views the page in French. With hreflang tags, you can specify that one page is for US residents and the other is for Britons, or you can make two different pages for users from Germany and Austria – this is exactly the purpose for which the hreflang attribute was developed.
Before reading this article, it is recommended to read the Google instructions.
#1: Let’s figure whether you need hreflang tagson your website at all?
Of course, this is the simplest step in the whole process but to make a reasoned decision, you have to consider several nuances – thus, you need it, if:
- You have the same content in different languages;
- You have content geared to different geographic regions, but the language is the same.
For clarity, here are a few examples:
1 example: an English language website which has 3 different versions: one for the US, a separate one for the UK, and the last one is purposed for the rest of the world;
2 example: a website with three international languages versions: English, Spanish, and French;
3 example: a global website with three versions for different continents based on the English language: for Europe, Asia, US, and Canada;
4 example: a website with an English and Spanish language versions but only for the US;
5 example: a website for one country with different native languages.
If any of these examples is similar to your situation, you definitely need a hreflang attribute.
#2: Make a map of your website country versions and languages
The current location of the user and the settings of his language determine the most appropriate URL. The user can have many languages in the browser settings. The order in which these languages appear in the settings determines the most appropriate language for user’s convenient experience.
The best idea is to create a three-column table:
- Language: One website version has only one language and it is important not to mix languages on one;
- Site version: You can create several site versions on one of several domains, or on different subdomains;
- Countries: Every site can target the audience from one country to all in the world.
For one language or one country sites, this table is very simple. However, for all others, there are some more detailed examples.
1 example: an English language site which has 3 different versions: for the US, for the UK, and for the rest of the world.
You can use different domains. For example, the site for US and the rest of the world can use domains like .com/us/ or .com/en/, when the UK site can be hosted on .co.uk. In fact, it is not necessary to use different domains and UK version can be on .com/uk/, but it is a good example.
2 example: a website with three international languages: English, Spanish, French.
It is mostly for global company’s users with different languages and countries, like SaaS or similar industries (note that the same .com domain is used for all three versions but in different subdirectories).
3 example: A global site with three versions for different continents based on the English language: Europe, Asia, US, and Canada.
You have the same language but the audience comes from all continents. Therefore, there should be three different options:
- Countries in Europe: Belgium, Iceland, Germany, Austria, Switzerland, Portugal, Czech Republic, Hungary, Denmark, Finland, UK, Croatia, Italy, Luxembourg, France, Norway, Sweden, Netherlands, Poland, and other;
- Canada, US;
- Countries in Asia: China, Australia, India, Japan, Hong Kong, New Zealand, Indonesia.
4 example: a platform with an English and Spanish languages but only for the US residents.
This is an option for those countries with different state languages or multilingual environment, and in this case, you should consider using a country-specific domain like https://es. and https://en.
5 example: a site for one country with different native languages.
Usually, this option is used for e-commerce players (online stores, global online journals, travel or educational services, and other) around the world. B2B companies usually go with English over country native languages.
There is the mix of subdomains and subdirectory strategies with the idea to show how different the site options can be with the use of hreflang tag.
#3: Website structure and domain strategy
There is one very important rule. The Google interprets content automatically on country-specific domains (ccTLDs) as targeted at users from exactly one country. Still, as it was already noticed, the hreflang attribute can implement with almost all domain combinations, subdomains, and subdirectories:
- v gTLD (general top-level domain) is a top-level domain created for segmentation of electronic resources addresses of a certain class of organizations or communities;
- v ccTLD (generic top-level domain) is a top-level domain dedicated to a specific country; for example: .de for Germany, .fe for France, etc.
ccTLDS is associated with a specific country. On the contrary, gTLD are not country-specific. Not everyone has to consider this information but for international targeting, it is a very important thing because using ccTLD subdomain or subdirectory, you will only target the audience from one ccTLD’s associated country.
Using gTLD Google Search Console, you can choose to target the content for users from an exact country. By using ccTLDs, it is impossible to specify a country because it has already been chosen by your ccTLD. It is complicated, but let us see what we can do.
Using ccTLDs, you target the site audience from the corresponding country but not the audience from other countries with your domain website content. Make sure that you create a structure with targeting options “All countries” or “Rest of the world” in order to target users on gTLDs. What does it mean?
For example, you have a site with many country versions, but no generic language versions for the audience of other countries – then it will be reasonable to add generic language versions on a gTLD in already created language versions for users targeting outside of the markets we created the site for. Thus, indicating a decent international or multilingual domain structure you have, we can easily define the hreflang value for every website version. This is something you should keep in mind.
#4: Hreflang value to each country and language option
- Hreflang value has a language code and a country code, which are separated by a hyphen;
- The language codes have ISO 639-1 format, the country codes have ISO 3166-1 Alpha-2 format;
- Hreflang value can be assigned only one time, and, in accordance with this, you cannot have two versions of your site, which are targeted at the same language and the same country users (every language and country combination has to be unique);
- URLs can receive multiple hreflang values at once.
Now we can add the 4th column in the 5 example (second step).
All versions in «5 example» are targeted at an exact country hosted on a ccTLD, so all of them receive the optional country codes, and while website versions are hosted on ccTLDs, the country codes are not necessary. Because ccTLDs are automatically associated with the country. Correct country code hreflang values should always receive with URLs on ccTLDs.
This is a special value for the hreflang attribute called “x-default”, which specifies on where users should go if none of the languages matches their browser settings in your hreflang links. For the first time, such an opportunity was presented for international landing pages – we mean the pages to which you redirect users, depending on their location.
At the same time, it serves as a universal tool. If the location and language of the audience do not match the established ones, they are redirected. For example, the user from Germany is looking for something in the English language – as a rule, there will not be a suitable URL and in such cases, the x-default is used. The fourth link is added and it turns out:
#6: Hreflang annotations
Hreflang annotations should be implemented on a URL level. Therefore, every set of different country or language URLs receives its own set of annotations.
1. Not all pages might exist in all locations and languages. You should not use hreflang annotations to point none existing pages.
2. You need hreflang annotations only for pages you want to be indexed by search systems, which is a significant point to keep in mind.
3. Non-canonical URLs should not have hreflang annotations.
Choosing hreflang annotations can be a very complicated thing. The most important thing that you need to take care of is that your account pages are supposed to be linked with hreflang received annotations.
#7: Hreflang implementation method
There are three common methods:
1. XML sitemaps
There are several problems with processing the info in sitemaps by Google because it does not process XML pages that often. Therefore, choosing this method you can face some errors in Google Search Console.
Usually, developers prefer using XML sitemaps over implementing it in the HTML source code with each page for global (world) sites. We guess, many hreflang annotations make more problems in an XML sitemap than in the code header section of a page.
What to keep in mind? The decision is up to but if you still are going to use XML sitemaps implementation method, we recommend you to check out more information on Google’s recommendations before you make some mistakes.
2. The HTTP header of each page
Theoretically, the HTTP header of each page implementation method has all advantages you need:
- Google receives the info from HTTP header all the time, unlike in the case with XML sitemaps;
- You can set HTTP headers for every URL, even to the one without own source code, as well as PDFs and other non-HTML files.
However, this method is also quite complicated to use. SEO tools pay not enough attention to HTTP headers. Therefore, it often causes more difficulties than benefits but, on the other hand, the code on its own is quite easy to write and it is very similar to the HTML header.
3. The header section of the HTML code of each page
It is definitely the most popular and simple hreflang implementation method on the Internet. And most recommended for using across developers too. However, unfortunately, there are also some cons to this method.
There can be an error problem with using x-default value for your pages, so, if your site homepage is aimed to redirect the audience to their browser location or language, it is better to use other two implementation hreflang methods.
In addition, if you have many different location or language options, you will need to make lots hreflang annotations, which has some negative consequences. Which ones? The long additional code increases the web page size and thus, can slow down the load time and if you do not want to make your website size bigger, you should consider using another method. However, there is another thing to keep in mind. In fact, not always standard web pages sizes are the optimal ones (due to numerous reasons, including different countries’ Internet issues), so this is where you should do some research to find the most efficient option for your resource and its users.
There are also some important tips you should pay attention to while working with hreflang:
- You should create a Google Search Console for every location and language option;
- You should align your hreflang implementation with international targeting options;
- You should go throw and solve all errors in Google Search Console;
- Watch out for a great increase in webpage sizes if you do not want to annoy users with a slow loading;
- Do not forget to control your Google Webmaster Tools impressions.
Now you know everything! Using the hreflang attribute is an integral part of optimizing global web resources for correct perception by search engines and adequate determination of the correctness of displaying a particular language version for a specific user.
Fulfillment of this condition will provide your web resource with positive statistics of the main indicators taken into account by search engines, which undoubtedly will affect the overall results of its promotion.
Get Free Website SEO Score Online
Improve your SEO rating with the best website checker