Tuesday, December 24, 2024

A great day to do business

HomeMegaWhat Is Hreflang Attribute?

What Is Hreflang Attribute?

 

The problems with multilingual versions of a site are among the most frequent errors in SEO campaigns, as we said some time ago, and today we want to further deepen this topic and, above all, try to give some indication on the best practices to follow.
We are going to then focus on the hreflang tag and the correct implementation of this attribute, which allows you to convey sites and pages for users of different locations, as companies and publishers who operate on an international or otherwise multinational scale know well, and therefore need to know all aspects of this issue in order to properly serve content to the right users.

What is the hreflang attribute?

The link element in a page’s header contains hreflang annotations, which serve to tell Google what variants of the page are available in different languages and regions.

Google may track down localized pages without needing information from us, but it’s still beneficial to explicitly state that there are particular versions of the page directed at different languages or countries, in order to help users get to the right version for them.

The structure of each link element must be correct in order for Google to be able to recognize the language used in a web page and subsequently provide accurate results to those who use the search engine in that language.

It should be noted that the language_code is related to the language supported by the page, which can be unspecified (x-default) to signal any other language not indicated by the hreflang tag. This is applicable in scenarios where there are no respective languages set and when users can select their country from a map. This sentence is saying that the url_of_the_page is the exact address of the page version that is correlated to a particular language or geographical area.

To conclude, hreflang is an HTML attribute which signals to Google what language a certain page is written in, thus equipping the search engine with the information it needs to display the page in the language that the user is looking for. In simpler words, when the hreflang attribute is omitted, Google may show pages to users with a different language than the one they speak, or in a different country than the one they are in.

How to use annotations for multi-language sites

Google introduced the hreflang attribute in December 2011 for connecting Web pages in various languages. This is beneficial when creating material that is tailored to a regional audience. When a tag is present, search engines will send users to the most suitable version of the content available in their language, to guarantee them a satisfactory experience that meets their requirements based on their IP address localization.

We can also use hreflang in a more specific way, if we have contents targeted towards variants of a single language, suitable for instance to a certain region (for example, for the Spanish language we can set hreflang=”es-es” to localize the content in Spain, while hreflang=”es-mx” localizes Mexico) and intercept a more precise target, favoring currency variations, shipping, seasonality and culture.

Hreflang Characteristics

It is essential to make sure that it is understood: hreflang is just a way of indicating something, not a requirement. It is possible that, in spite of the hreflang attribute, search engines will rate a page with a different version higher due to other elements of SEO.

An attribute can only be included in one of three spots: the HTML header section, the HTTP header, or the sitemap. Google states that for every page variation, it is necessary to have a series of link elements within the head section, as well as a connection for each variant of the page including itself. This is to ensure that a uniformed link set is preserved on all versions of the page.

This step is vital when we have multiple pages related to diverse languages or locations, as it tells Google about the presences of these alternate versions so it can take users to the most fitting page based on language or area.

Hreflang and duplicated contents

Many individuals, especially those working with eCommerce, worry about providing content that appears duplicate, or similar to what a search engine would usually detect, even when it comes to the hreflang tag. Google states that pages are only considered duplicates if the primary content of the page is not translated for localization.

So, by taking advantage of the multilingual aspects of products or articles, we can avoid having duplicate content, and send out products or articles tailored to a certain audience or target, based on language or area.

When to use hreflang?

Google suggests three particular scenarios where it is preferable to use the alternative page system for specific languages or geographical areas:

  • Pages with user-generated contents, such as forums, if we keep the main content in one language and translate only the template (navigation bar or footer).
  • Similar contents in a single language but intended for areas with local variations, such as an English site for users in the United States, Great Britain and Ireland.
  • Site with contents fully translated into different languages, such as each page presenting Italian, German and English versions.

It is apparent that this attribute holds great worth for multilingual SEO, since it can demonstrate the connection between pages understood in different languages and greatly enhance the targeting of organic traffic, since Google will display a particular version of the website depending on the area where its users are located.

Additionally, there are positive impacts on the user’s experience due to the fact that, for example, an Australian can buy items on a site using their own currency (the Australian dollar) instead of the US dollar as a default option and a person from the Canton Ticino region of Switzerland being able to view a German website in Italian.

Common Mistakes And Troubleshooting

Typos and Underscores

Messing up something seemingly small like using the wrong country code, not providing a language code despite using a country code, or using an underscore instead of a hyphen can make your hreflang attribute not work correctly. Despite a 2017 tweet dialogue between Google Webmaster Trends Analyst Gary Illyes suggesting that it wouldn’t cause Google a lot of trouble if mistakes were made – hypothetically, that is.

Though it is speculated that you could get away with switching GB and UK as country codes since Google is quite intuitive, it is best to stick with ISO 639-1 format to indicate language. If you utilize a wrong abbreviation (like using “eng” instead of “en”, for instance), Google is likely to disregard it, leading to your code not being able to carry out as intended.

Not Using Self-Referencing Hreflangs

Including a self-referential hreflang tag on the page is another typical problem. Make sure that a hreflang tag is included that mentions the language and geographical location of the page itself, as well as identifying other pages.

Neglecting Bing

In conclusion, if you have aspirations for your international website to function on Bing, you must abide by their individual requirements. If you are looking for instructions on how to inform Bing about the language and region of your website, there is an article from Bing Webmasters, however, this guide is outdated since the meta tag http-equiv=”content-language” is no longer an approved method since the update to HTML5.

Rather than relying on outdated methods, it is commonly accepted to identify the language of a page utilizing lang= and to target the desired audience with the Content-Language header.

Some Things To Know Before Implementing Hreflangs

Consider A Language Code With No Country Code

A user might be led astray in other ways as well.

If you specify a URL for an audience with a certain language and living in selected countries (e.g., en-us), but don’t give a URL for someone with the same language but residing in a country not included (e.g., an English speaker in Italy), Google will attempt to make a good estimation.

Meaning it could get it wrong.

Think about incorporating a general tag which has the language coding but nothing concerning a specific country. This generic tag with “en” as its value will assist in directing an English-speaking user living in Italy to the right version of a page.

When it comes to actually using hreflang tags, there are multiple details that need to be taken into consideration. This video from Google is not up to date, however, it gives an excellent summary of the potential pitfalls. It is definitely worth a watch.

Don’t Want To Target Anyone? Use x-default

‘hreflang=”x-default” essentially indicates that the URL does not target a specific language, making it available to all. It is especially useful for pages that are for multiple languages or for selecting a language.’ It certainly beats adding tags for masses of languages.

Reasons For Not Using Hreflang

You Have Duplicate Content In Different Languages

Using hreflang attributes won’t do harm, but it is not mandatory in order to prevent the same content on pages that are the same language translations.

Google still encourages you to help its crawlers by using hreflangs, but multiple versions of a page won’t be regarded as copies provided the majority of the content is translated.

Do not rely on hreflang implantation doing much when it comes to rankings, as it is not likely to be a cause of any ranking issues.

You Want To Lock Google Searchers From Other Countries Out

If you’re aiming for guaranteed results that your website will only show up for users in a single country, hreflang may not be the ideal solution. Rather than relying on guesswork, you can use Google Search Console if you have a generic high-level domain like .com, instead of something like .ca. This system is reliable, but less forgiving.

Choose a target country in the Country tab of the International Targeting report in Google Search Console and make sure to tick the ‘Geographic target’ box.

This might seem like a good idea. You should only consider this approach if you are absolutely sure you don’t want any organic search traffic that originates from beyond one nation. Keep in mind that Google will try to stop your website from being accessible to anyone outside of your desired country and not only focus on giving suitable results for the local searches.

Are you sure nobody, not even a citizen living abroad, could find value in your services or products and become a potential customer?

Maybe you want to do exactly the opposite of this. You can choose “Unlisted” in the drop-down menu linked to the “Geographic target” checkbox instead of doing the above. That way, your site won’t have any regional limits.

You Are Only Optimizing For Bing or Baidu

It appears improbable that this would be the case with the majority of Western websites; however, it is still a probability. It has been confirmed in certain parts of the world.

As previously discussed, Bing does not rely on hreflang tags to determine the most optimal language and country of a page. And nor does Baidu, China’s preeminent search engine.

If you are aiming to draw in an audience from China or to improve Bing search engine results, it is important that you set the language and target audience in the HTTP header.

Summary

The tag attribute Hreflang helps search engines identify the version of a website that should be shown to international users. It is essential to make sure that the right language and country codes are applied in all places when adding the attribute to your website.

If you desire to examine the hreflang tag’s use on your website for any mistakes, use the SEMrush Site Audit tool. In order to optimize your global website, multiple verifications have been put in place particularly for international SEO.

 

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular