Hreflang: How to Setup Hreflang Tags for Global SEO

Most of the websites target users from a specific location or geography, but a large number of online sites target users from across the world. This implies they scale globally and hence need to practice the international or global aspects of SEO.

Every country has a different language. In order to target users of different countries, it is vital to translate your website into varying languages. This makes it easier for users to understand and connect to the website. However, this may not please the search engines.

Hreflang Tags

In an attempt to target people from different countries by using one website, web marketers publish translated copies of the content on distinct URLs. But this is something that must not be practiced as it does not lend any help to Google to understand the relevancy between your website set up and URLs.

Ultimately, the pages can be considered suboptimal and ultimately may not rank well in search results.

So, is there any solution for the same?

Luckily, we can tell you a simple and effective solution, which is applicable in most of such cases. It is using Hreflang!

What Hreflang is and how does it help Google to understand your website? Sure, such questions must be popping in your mind.

Hence, here check details about Hreflang Google.

What does Hreflang Means?

As per definition, the hreflang tag is the Meta tag in HTML. It mentions the language as well as the relevant geographic location for a webpage. With the help of Hreflang, search engines can easily search for content in varying languages.

When done precisely, the hreflang tag lets Google bots read the pages to find the relevant content for users, which do not mention the language of the first page.

When a user performs a search on Google, it must take into consideration the following aspects:

  • The user must decide where it must rank the URL using the algorithm.
  • The user must check the code of the page and look for hreflang tags.
  • The user must look at the current location of the user considering IP settings and based on the IP address.
  • The user must display the most appropriate URL in SERP, which sends the user to the particular URL.

The main reason why search engines check the hreflang tags is that it is able to serve the correct version of the page on the basis of language settings of the user. In simple terms, Google knows about the URL to display for the French speaker and the page to display for an American speaker.

Also, it knows the version to display someone in one country and display someone in the other country.

When Should the Hreflang Be Used?

The hreflang tag is useful in three different situations.

  1. It can be used when only the page template is translated into different alternate languages. However, the main content of that page remains the same. A good example of this is the page featuring content generated for users such as message boards and forums.
  2. It can be used when there are pages in one particular language considering variations in different regions. For example, there are separate pages in English version for the UK, US, Ireland, and Canada.
  3. It can be used when you have completely translated the content of your website into innumerable languages. One good example of this is WooRank that contains pages in 6 languages – Spanish, Portuguese, German, Dutch, and English. When content is available in multiple languages, a hreflang tag can be added to the webpages denoting the same.

In order to verify how WooRank uses the hreflang tag, you can check out its homepage. You simply have to right-click on the homepage and select ‘view source.’ You will be able to view the hreflang tag and see the action.

Ways to Add Hreflang Tag:

There are different ways using which hreflang tag can be added to webpages.

  1. For an HTML page, the hreflang tags can be entered into the (heading).
  2. However, if you have non-HTML pages, such as PDFs, you can add hreflang tag within the HTTP header.

In the above-mentioned example, the hreflang=en aspect of such tags informs Google the listed URLs is the English version of that particular page. So, it shows the URL only to those users who have set English as their preferred language in the browser, or to countries that speak English only.

Similarly, if there is a hreflang=es tag added, then Google would mention that URL only for Spanish speakers.

When hreflang tags are added to a page, it is best to include one link to all aspects or versions of a webpage. It includes a self-reference link as well. Therefore, if there is a page designed in English, French, and Spanish, every page would comprise all 3 tags such as:

  • Hreflang=’en’
  • Hreflang=’es’
  • Hreflang=’fr’

Moreover, the same geographies or locations can be added to the hreflang tags. This can be done easily by adding the code of the country after the code attribute for language within the hreflang attribute. Hence, if your website above targets different countries with each language, they would appear like this:

  • Hreflang=en-us href=https://wwww.example.com
  • Hreflang=fr-fr href=https://www.example.com
  • Hreflang=mx-es href=https://www.example.com

When such tags are used by Google, it knows the way to show English version to the users in the Spanish, US, French, and Mexico to speakers in France who speak French.

Moreover, when hreflang tags are added to the pages, it is best to use ISO 639-1 format for distinct languages and the 3166-1 Alpha 2 format for different countries. In addition to this, the value of hreflang must always be written in the language and then the country. Even, geo-targeting must be limited to certain countries.

Remember, continents, regions, or cities are not supported by Google.

How to Add Hreflang Tag to the XML Sitemap:

It is possible to incorporate the hreflang tag to the XML sitemap. When you add hreflang annotations, it can be slightly painful. It is because you have to incorporate varying language option to every URL in the sitemap.

In this situation, there is only one URL, which is worth markup for the page in two distinct languages.

<xhtml:link rel=”alternate” hreflang=”en” href=”https://www.example.com”/>

<xhtml:link rel=”alternate” hreflang=”es” href=”htpps://www.example.com/es”/>

Using this is not much difficult if there is only one page holding only a single alternate. However, it can become a tedious task and it can become difficult to manage when the website grows. It is because there are more languages and pages added to the same.

However, there are a few good reasons for adding hreflang annotations to the XML sitemap.

These reasons are as follows:

  • Adding sitemaps is of great help to search engines. It makes it easier for search engines to crawl and search websites. So, when you add alternate URLs to the sitemap, it will help them found more precisely and easily.
  • Secondly, adding a sitemap keeps additional code off the webpage. It reduces the page size and it may not appear much. But when a second of time increases in loading, it can cost you sales. In the online world, every bit counts. Hence, you cannot afford to increase even one second in loading the website.
  • In addition to this, considering all hreflang links in just one place makes the change management process much easier. It is slightly difficult to update different pages rather than changing only one sitemap.

When do Canonical Tags and Hreflang Must be Used Together?

An important thing to remember is that hreflang tags cannot be used as substitutes for the canonical tags. Even, they can be implemented together.

You simply have to add a canonical tag every copy of that page, which points back to it.

Similarly, you can add the hreflang tag and canonical tag for the French page as well as the Spanish page.

This might seem simple. However, there are chances that you may get it wrong.

Mostly, people tend to make two common mistakes such as:

When non-canonical URLs are used in hreflang tags – The canonical and hreflang tag function together to let Google and search engines know how your website works. By using non-canonical URLs in the tag, Google can get confused. The same can break the implementation.

Secondly, a mistake can occur when an incorrect code of the country is used. Usually, people use ‘uk’ for the United Kingdom. However, the correct code for the same is ISO 639-1 format is ‘gb.’ Also, it is not common for people to accidentally switch language as well as country values.

The Impact of Hreflang Tag on SEO:

When it is about SEO, hreflang can be useful in two different ways.

  1. The first use that hreflang offers for SEO are that it helps in reducing the issues that occur because of duplicate content. By using the Hreflang tag, it is possible to tell Google that the two pages hold some relevance to each other. This way, bots and search engines are able to assess the relationship between two pages and do not consider the two of them as copies having the same or duplicate content.
  2. Secondly, the hreflang tag help users to make sure that they serve only the right kind of content to the correct users. If there is a website designed in numerous languages, or you have a website that targets varying locations or geographies, you are likely to invest a lot of time, effort and thought into creating content and online marketing strategy for specific audiences. When a hreflang tag is used, Google clearly understands about the page. Hence, it displays a page in the English language for the English user and a page in the French language for a user in France, and so on.

If the same does not happen then it can increase the bounce rate of your website to a great extent. As a result, it can create a high negative impact on conversion rates. Moreover, a large number of people will not be able to take the time to find the correct language version of this page. This can happen even when you prominently display the same.

Common Errors to Avoid While Using Hreflang:

Ultimately, the process of using hreflang is a straightforward one. But you are required to add hreflang tag to every page translated that includes links to each version. Hence, there are lots of chances when you may make a mistake while using hreflang.

If there are hreflang errors available on the pages in your sitemap, it can make Google confused about indexing your website. This may result in your content being displayed to the incorrect audience.

Hence, make sure you do not make the common hreflang errors:

1. Using Incorrect Country Code or Language:

This is a common mistake that most people make while using hreflang tags. We have already mentioned that Google uses ISO 639-1 format to support languages and ISO 316601 Alpha 2 format to support countries.

Hence, it is essential that adequate language and country abbreviations are used. For example, Google’s preferred format for the United Kingdom is ‘gb’ and not ‘uk.’

2. Missing or Wrong References:

To ensure the hreflang tag works well, it refers to the correct URLs. Each version of the content must refer to all other versions.

Missing or incorrect references, also known as return tags are a common mistake that must be avoided. Otherwise, it can make Google confused about the relevancy of content and from indexing the pages accurately.

3. Avoid Using Hyphens:

It is vital to separate country and language codes using a hyphen. Sometimes, people use commas, underscores, punctuation, or semicolons between them. It is vital to use a hyphen and check manually to avoid experiencing this error.

4. Linking to Non-existent, Broke, or Redirected Pages:

When hreflang is linked to such pages, it offers no value to the users as well as search engines. Google cannot access such pages and hence would not be able to serve them to the correct audience.

So, make sure you never link to such pages.

5. Swapping Country and Language Codes:

To achieve adequate results, the country and language code must not be swapped and use correctly. Swapping the codes will make the hreflang tag ignored or invalid.

To Sum Up:

Make sure you implement hreflang tags easily and remove the errors. Moreover, you can use the International Targeting Report in Google Search Console to check errors and rectify the same. I Hope, you are able to gain the desired results using the hreflang tag.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.