fbpx
Home/Blog/SEO/The hreflang attribute for a multilingual site

The hreflang attribute for a multilingual site

While promoting sites in several regions and attracting users from different countries, SEO specialists face several specific problems. One of the most common among them is the correct display of the promoted site in specific regional results. In this regard, the key task of a specialist is to help search engines understand which countries the site pages are aimed at, as well as in which languages the content is presented on it. For this, special link attributes are used. In particular, they include hreflang, the attribute implemented by Google.

What is the hreflang attribute

The hreflang attribute is an extension for websites with content in multiple languages. It is used to correctly display relevant versions of the resource in search engines following users’ requests. In addition, this attribute prevents the two pages of the site from sticking together.

How websites use the hreflang attribute

When you enter a specific query in the search bar, Google will understand where the consumer is located and will offer him the most relevant version of the site in the results without the need to enter any additional keywords.

What hreflang looks like

In the HTML code, the attribute is represented as follows (as an example):<link href=”https://lanet.click/contacts/” rel=”alternate” hreflang=”uk-UA” />Let’s consider its main components:

 

  • rel=”alternate” is the HTML attribute of the link tag;
  • hreflang=”language and country code” — this part of the code indicates the specific language of the page, as well as the country for which it is used.

Is multilingualism necessary on the site

The multilingualism of the site is necessary for it to rank in the search for more queries. In turn, under this condition, SEO promotion will be more effective since a multilingual resource will cover a large audience and will be able to generate high traffic.

How to designate different language versions of resource pages

Let’s get acquainted with the main methods used to implement the described attribute.

Creation of separate domains for different languages

Creating separate sites, each of which will be localized for a certain language, is the most expensive of all available options. The result is two separate domains that require separate promotion and updating published information.

Subdomains

If subdomains are created, the search engine will recognize them in the same way as in the previous case — as separate sites. It means that this method has the same disadvantages.

Subfolders

The optimal way, in this case, is to create subfolders (as implemented on our website — https://lanet.click/ru/ and https://lanet.click/en/). This option is not only the simplest and cheapest, but also the most effective.

When specifying alternative pages is necessary

It means of promotion is needed in the following cases:

 

  • if there is a complete translation of the website’s pages in another language;
  • if there is a translation of certain elements of the site;
  • if the content is published in only one language but with different information for consumers from different countries.

When the hreflang attribute should not be used

There are also several situations in which specifying alternative pages is not recommended.

For sites in the same language with similar content

It refers to those cases when the promotion of resources is necessary on the territory of different countries, but at the same time, similar content is published in one language.

For pages that are non-canonical

It is about if a certain site page has a duplicate. When pointing the rel=canonical tag to another page, conflicts may occur, confusing the search engine.

Correct use of the hreflang attribute

Let’s consider the main ways of using the hreflang attribute so that the promotion of a multilingual site is correct and effective. There are only three options for its implementation.

Using HTML tags

The most common option is to place the code in the <head> of the document on all pages. The language and region code is indicated here, and the corresponding link is attached.

Using an HTTP header

This option works for formats other than HTML (such as PDF). The HTTP header structure specifies the corresponding page address, as well as the region and language code.

Using the Sitemap file

Effective indication of the required alternative page can be achieved by including appropriate links in the structure of the Sitemap file.

Languages and regions

To implement the hreflang attribute, you must specify the standard language and region codes. The first case uses the ISO 639-1 format (e.g. ru, en), and the second ISO 3166-1 Alpha 2 (e.g. ru-en, es-ar).

What is x-default

The x-default value helps to determine the required page to automatically redirect the user to the request. As a rule, the main page of the promoted site is used for this.

Errors in using the hreflang attribute

Several technical errors can be made when implementing the hreflang attribute, which will prevent search engines from seeing it in the site structure. These include the following common cases:

 

  • no backlinks;
  • lack of reference to itself on the page with this attribute;
  • indicating only the country code;
  • using an attribute on a non-canonical page;
  • more than one language code is specified for one link;
  • specifying several pages with the same language code;
  • missing the required x-default value in the hreflang attribute.

How to identify and fix existing errors in the hreflang attribute

Hreflang checking and troubleshooting are not done manually but automatically, thanks to the capabilities of the Google Search Console tool. For this, the functionality of the «Targeting countries and languages» report is used.

Conclusion

In general, a language markup is an effective tool for promoting a multilingual site. With its help, the ranking in the regions indicated in the code will be significantly improved, as well as the user experience.

Worth a read

Among the best in the SMM category: Lanet CLICK in the IAB Ukraine ranking

Among the best in the SMM category: Lanet CLICK in the IAB Ukraine ranking

The non-profit organization IAB Ukraine, which is a member of the international association Interactive Advertising Bureau, summed up the results […]

How to promote a medical site in 2024

How to promote a medical site in 2024

Promotion for the site of medical services is associated with additional difficulties due to the nuances inherent in this niche. […]

10 Steps to Optimizing Your Local Business (GMB)

10 Steps to Optimizing Your Local Business (GMB)

Google My Business is an essential tool for businesses with a physical location. This service is especially important for companies […]