When you market your website internationally, you need to manage multiple target audiences that speak different languages and have significant cultural differences that affect their viewing habits and preferences. Mistakes made in global SEO can be very costly and may turn off entire audiences. That is why it is vital that you know how to separate the versions of your content shown to different audiences. That’s where hreflang attributes come in. These tags help search engines understand which language and region your page is intended for, which can make a big difference in your site’s global SEO performance. Essentially, they help ensure your content shows up in the right place, for the right people.
In this article, we will look in detail into the use of hreflang link attributes.
What is Hreflang?
Hreflang is a simple HTML attribute that lets search engines know what language and region a particular webpage of your site is targeting. It helps differentiate content meant for different countries or languages and at the same time, it links alternate versions of the same content together. Let’s say you have the same blog post in English, French, and Spanish. Without hreflang, search engines easily get confused: which version to show to users in Canada? What about Argentina? This can get extremely complicated if your users come from all walks of the world and they’re searching from various countries. Thus, your US users can be searching for ‘sneakers’, people from the UK – for ‘trainers’ and Serbians – for ‘patike’. And they will all be searching for the same thing!
How does Hreflang Work?
Have you ever noticed that when you google something, especially if your query is not very specific, the search results are usually shown in the language of your query? This is mostly because Google knows what country you browse from. It also assumes that the language you browse in is your native language. That is why it offers you content intended for your language of choice. Even if you search for something like ‘French recipes in French’, the SERP will be mostly in English, offering a selection of websites which help you learn French with the help of food recipes.
Typically, you would use a hreflang tag in the <head> section of your HTML code, using the <link> element. Hreflang tags have a specific set of values, each of which is a code for a particular language and often its geographic variant. For example, fr stands for French zh-hans means your target audience speaks Simplified Chinese.
When you use this attribute, you basically let search engines know who is the proper target audience for this page. When a search engine crawls your website, it picks up on various hreflangs and uses them to narrow down the audience. With the correct choice of country and language hreflang, you can target your content with a much better international precision.
How to Construct a Hreflang Tag
Building hreflang tags isn’t rocket science, but it does need to be done right. Here’s a quick breakdown of how to create one:
- Start with the <link> tag in your page’s <head> section
- Add a rel=”alternate” attribute to indicate that a particular piece of content has alternative versions
- Use the hreflang attribute to specify the language and region code. For example:
This code tells Google that this page is suitable for a generic French-speaking audience.
However, if you want to specify that the content is in French-Canadian and is intended for users in Canada, you need to add a country code as well:
Make sure you are familiar with the standards for writing hreflang codes for various countries and languages. They follow these conventions:
- Language codes (from ISO 639-1) are in lowercase (e.g., “fr” for French, “en” for English).
- Country codes (from ISO 3166-1 alpha-2) are in uppercase (e.g., “US” for the United States, “CA” for Canada).
Don’t forget the self-referential hreflang tag, which points back to the current page.
- If you have a catch-all page (say, for regions not covered), use the x-default value:
This tells search engines which page to show when no specific match is found. If a user from an unspecified location searches for your website, this particular site version is shown to them.
Best Practices for Hreflang Implementation
There are a few rules to follow when you use hreflang tags.
1. Your hreflang tags should always be bidirectional
If you have a hreflang tag on your English page pointing to your French page, the French page needs a hreflang tag pointing back to the English page. This mutual linking is necessary so that search engines confirm that these pages are alternate versions of each other.
2. Include a self-referential hreflang tag
A self-referential hreflang tag is a hreflang tag that points back to the same page it’s on. It defines the target audience in terms of a particular language and region and thus tells search engines who to show it to. This is important because it reinforces the connection between that page and its language/region.
In the example above:
- href=”https://example.com/en-us/” points to the current page (the English version for the US).
- hreflang=”en-US” specifies that the content is in English and is targeting users in the United States.
3. Do not overlap tags
Make sure you are not using overlapping tags. For instance, a generic language tag together with a specific country-variety language tag. Having both “en” and “en-US” hreflang tags can confuse search engines about which version to show.
4. Use X-Default tags
The x-default tag should be used for pages that cater to a more general audience. It acts as a fallback for users in regions not specifically targeted by your other pages.
The image below shows the most common hreflang issues, according to Ahrefs:
Why Hreflang Matters for SEO
It may seem like a little tick, but in reality, hreflang tags make a huge difference about how your website is searched, targeted, and received. Here are key benefits of properly used hreflang tags for your overall SEO.
- It improves user experience
Like we mentioned above, people from different countries and cultures consume content on the internet very differently. They have their specific habits, preferences and strikingly differing ideas of what they find likable and click-worthy. Take a look at this: a Rakuten Viber page targeted for the US and for Japan:
Japanese Version
US Version.
The design difference is quite striking, is it not? And yet, it is a fine example of a company taking into consideration the cultural differences of their audiences. When you craft your content with such precision and care for your audience’s tastes, it creates a much better customer journey. And hreflang tags is the technical means to deliver custom content to your viewers.
- It affects international SEO rankings
Hreflang tags are a clear signal to search engines which version of a webpage best matches the audience. This helps you to improve the visibility of your content in country, language or region-specific searches. Also, by boosting customer experience with hreflang tags, you also add points to your SERP rankings, because Google counts good UX as one of the ranking factors.
- Helps to reduce duplicate content issues
If you don’t use hreflang tags, chances are, Google can mistake your language versions for duplicated content. This could be quite detrimental for your SEO, as Google views duplication of content as manipulation. Hreflang tells search engines that these are alternate versions of the same content for different regions, preventing duplicate content penalties.
- Helps with Accurate Indexing
Indexing is the cornerstone of SERP calculations. Proper hreflang use helps search engines index the right pages for the right users. Instead of Google serving a random version of your site, hreflang ensures that each user gets the page tailored to their language and region.
Examples of How hreflang Tags Affect SEO
Netflix
Netflix operates in many countries and offers its platform in multiple languages. It also has a lot of country-specific content, in case a movie or a series can legally be available in one country but not in another. If a Spanish-speaking user from Mexico searches for Netflix content, Netflix’s hreflang tags ensure they are shown the version of Netflix’s site tailored to Spanish speakers in Mexico. In this case, the user will see what’s trending on Netflix in Mexico, will have immediate access to their native-language descriptions and, if available, subtitles and voice overs. The suggested content for this user will also depend not just on their personal preferences, but on their geographical location. Without hreflang, users could be directed to a generic English site or a Spanish version meant for Spain, creating a less personalized experience and possibly leading to higher bounce rates.
Airbnb
Airbnb operates globally with listings and content in various languages and regions. The use of hreflang tags allows Airbnb to ensure that a French user looking for accommodations in Paris is served a French-language version of the site. At the same time, an English speaker searching for the same listing in France will get the English-language descriptions. If not for hreflang tags, listings of the same property in different languages could be viewed by google as duplicate content and cause trouble. It also helps to create a much better user experience and improve search of properties abroad.
ZARA
Zara, the global fashion retailer, has different country-specific e-commerce sites. Not only do they have language-diverse descriptions, but they may offer a different variety of products or even region-specific collections. With hreflang, a shopper in Japan who searches for Zara clothing is directed to the Japanese site in their local language, with pricing in local currency and a selection that is available on the Japanese market. They will avoid the frustration of trying to order an item of clothes they like only to find out that it’s only available in Europe.
Conclusion
Hreflang is an essential part of on-page SEO, especially if you are targeting a global audience. It helps search engines serve the right content to the right users, improving your site’s visibility in international markets making the user experience you offer to your visitors smoother and more tailored. Hreflangs help you to bring the element of order into the regional and language versions of your site and avoid a lot of confusion and consequences associated with duplicate content issues . Whether you’re running an e-commerce store, a content-heavy platform, or a service-based business, using hreflang can be a game-changer for your site.