How to fix issues when setting up hreflang tags
If you’re in the process of developing a website that supports several languages, you’ve probably heard about hreflang tags. So, what exactly is a hreflang? And why should you give hreflang tags a second thought if you already have various language versions of your website?
If you continue reading, you will get the answers to those questions and a great deal of additional information. This article is going to give all of the information regarding hreflang tags.
What exactly is hreflang, and why is it so essential?
If you have numerous versions of sites available in a variety of languages and regions, it is crucial for you to take advantage of the hreflang tag. An hreflang tag is an HTML attribute that indicates to Google which language to use when displaying the content. This helps Google serve the appropriate version of your page to people searching in a certain language, giving them a better search experience and sending a trust signal to Google.
An hreflang tag also provides a signal to the search engine about variations on the page. When a page contains the appropriate hreflang tag, search engines like Google can better deliver the right content to relevant users.
Here is an example of how hreflang tags appear in the HTML of your website:
Hreflang tags do not support an absolute directive. The majority of the time, hreflang tags indicate to Google which content to prefer, but nothing is guaranteed.
Search engines such as Bing hardly consider these tags. Bing uses meta tags such as the html lang=”en”> tag to organize and display content.
Let’s look at an example to see how the hreflang tag is supposed to be used. First, let’s imagine you create two homepages that are precisely the same, with the exception that one of them is in English (hreflang=”en”) and the other is in Spanish (hreflang=”es”).
As long as the Spanish edition of your homepage is clearly marked, users who conduct searches for your webpage in Spanish or from browsers that support the Spanish language will be directed to the Spanish version of your homepage.
There is a unique hreflang tag assigned to each language and country. The following is a list of the most common ones:
- German/Germany: de-de
- English/USA: en-us
- Irish/Ireland: ga-ie
- Hindi/India: hi-in
- Italian/Italy: it-it
- Japanese/Japan: ja-jp
- Korean/Korea: ko-kp
- Portuguese/Brazil: pt-br
- Russian/Russian Federation: ru-ru
- Chinese (simplified for Chinese Mainland)/China: zh-hans-cn
- Thai/Thailand: th-th
The exact page can have various tags if you share it with people in different parts of the world. For instance, it’s possible to use HTML to tag your page if your French website also sells to customers in Germany and Spain.
Hreflang tags create a better user experience, when they’re done correctly. Below are some ways you can avoid, prevent or fix many issues that are connected with setting up hreflang tags.
Eliminate redundant content
Incorrect implementation of the hreflang tag will lead to duplicate content problems. Although Google does not directly penalize duplicate content, you don’t want an English website created for Americans to rank higher than an English page designed for French speakers.
Segment content based on language and country codes
To properly structure each web page for a single language and country, hreflang tags demand time, money, and dedication. You must also research the HTML codes for every country and language.
Maintain hreflang tag organization when adding new content
As you add more and more content to your site, using hreflang tags will become difficult without organization. For example, consider the challenges that huge ecommerce companies face regularly when they add new products for sale worldwide.