The SEO Attribute for Content in Multiple Languages


Have you ever visited a webpage that was in a different language and your browser asked if you want to change it to your first language?

It’s a lifeline, isn’t it?

This is possible thanks to language tags or hreflang tags, which are used to let search engines know which language the content is in.

Free Guide: How to Perform an SEO Technical Audit

Now consider whether you have provided the functionality for yours own web pages are ready for a global audience. If you haven’t tagged or redirected your content to optimize it in different languages, you may not be gaining the traffic it might have. Let’s take a look at how hreflang tags can help deliver the right results to your visitors.

Jump to

Hreflang tags (also known as rel = “alternate” hreflang = “x”) allow you to show Google and other search engines the relationship between web pages that are in different languages. For example, if your tag has to link to an English blog, you’ll use the following tag: hreflang = “en”.

What are hreflang tags like?

Hreflang tags have an established syntax. Here’s an example of how to write hreflang tags.

Syntax

The label is divided into three parts:

  • link rel = “alternate”: Indicates to the search engine that this is an alternate version of the page.
  • hreflang = “x”: Specifies the language.
  • href = “https://example.com/alternative-page”: the alternate page is at this URL.

Example

Here’s a look at what a webpage will look like when tagged with a hreflang attribute:

The “en” in the first part of the label refers to the language code, English, and “USA” refers to the country code, for the United States.

Let’s say we wanted this same page in Spanish for customers in Mexico. The hreflag tag would be:

Users with an IP address that notifies which language is used will automatically see a properly tagged webpage, so a hreflang tag is especially useful if you have a global audience and want your user experience to be enjoyable.

Hreflang Tags Vs. HTML Tags Lang

There are two different types of language tags: HTML lang tags and hreflang tags.

While HTML and hreflang tags are designed to optimize content in multiple languages, they have a couple of differences.

Simply put, the language tag (or lang) attributes of an HTML tag indicate in your browser the language of the current document or webpage, while the hreflang tag attribute tells your browser the language of the webpage being linked to; for example, a lang tag in HubSpot.com indicates the language of HubSpot.com in your browser, but a hreflang tag attribute indicates in the search engine the language of HubSpot.com when a user searches for HubSpot.

If a user searches for HubSpot.com from Germany, a hreflang tag is responsible for changing the link available to search engines. However, when someone arrives at HubSpot.com in Germany, a lang tag changes the language of the page.

Examples

It may be easier to view, so here’s a sample lang tag:

Alternatively, here is a sample hreflang tag:

Google recommends using hreflang when indexing websites that are in different languages.

You may also want to use HTML language tags along with a hreflang tag: they can work together to inform search engines about the content of your web pages. Having both tags tells search engines in which language a webpage is located, while directing users from other countries to the appropriate webpage.

Here’s what hreflang tags are used for and how you can use them for your own web pages.

Why do you need hreflang tags?

Ultimately, it is useful to use hfreflang tags so that you can create a better user experience. If a user in Germany searches for HubSpot, we want to make sure that the search engine result shows our site in German and not in English. In addition to a better user experience, this can also help reduce your bounce rate and increase your conversion rates so that you show the best version of your site to the right audience.

Another advantage of using hreflang tags is that they avoid duplicate content. Suppose you have the same content in different URLs addressed to Spanish speakers in Mexico, Spain, and Chile, but with slight differences depending on the target audience, such as currency. Without a hreflang tag, Google can see this as duplicate content.

Hreflang tags tell search engines that while the content may look similar, it is aimed at different audiences.

How do hreflang tags work?

To illustrate how hreflang works, consider an example. Suppose you make two homepages that are the same, but one is in English (hreflang = “en”), and the other is in Spanish (hreflang = “es”).

When a user searches for your homepage in Spanish or from a browser in Spanish, they will receive the Spanish version of your homepage, as long as it is correctly tagged.

Each language and country has its own hreflang label. Here is a list of the most common:

  • German / Germany: de-de
  • English / US: en-us
  • Irish / Irish: ga-ie
  • Hindi / India: Hello
  • Italian / Italy: it-it
  • Japanese / Japan: ja-jp
  • Korea / Korea: ko-kp
  • Portuguese / Brazil: pt-br
  • Russian Federation: Russia
  • Chinese (Simplified for Mainland China) / China: zh-hans-cn
  • Thai / Thailand: th-th

If you share the same page in different regions, please note that it is possible to have multiple tags on the same page. For example, if your French website also sells to customers in Germany and Spain, you can tag your page accordingly in HTML.

Hreflang tags are bidirectional and work in pairs. If you add a tag to an English page that points to the Spanish version, the Spanish version of the page must also have a hreflang tag that points to the English page.

Keep in mind that because hreflang tags can be replaced by other SEO options, your page may be ranked higher in a different language. To avoid this, make sure that the search engines are equipped with the correct attributes, so that they know in which language to present your page.

If all this is a bit confusing, don’t worry. You can use a free Hreflang tag generator, so all you have to do is copy and paste the code. Let’s look at some examples below.

Hreflang tag generator tools

1. The Hreflang tag generating tool

Hreflang tag generator tools: Hreflang tag generator tool

Image source

With this tool, you can generate hreflang tags for your site in multiple languages. All you have to do is add the URL to your site and choose which language it is in.

This is a great tool because you can even upload a CSV with up to 50 URLs and generate the hreflang tag for 50 sites at once.

What we like

Its ability to upload up to 50 URLs at a time to generate 50 hreflang tags will save you time.

2. Geo Targetly

Hreflang Tag Generator Tools: Geo TargetlyImage source

Geo Targetly is another great hreflang generating tool. It’s easy and free to use. All you have to do is enter your URL and language, and then voila.

While you can’t upload 50 sites at a time, this is a quick and easy option.

What we like

The Geo Targely tool is simple and easy to use, making it a great choice for beginners or smaller sites.

3. Sistrix

Hreflang Tag Generator Tools: SistrixImage source

The Sistrix tool is similar to the other two tools above. All you have to do is enter your URL and language, and then the tool will generate the code for you.

Although you can’t import a list from a CSV, you can enter multiple domains at once to generate the tags you need.

What we like

This Sistrix generator allows you to enter multiple domains at once to generate hreflang tags, and has a rate tag validation tool if you want to make sure the tags on your site are correct.

Use Hreflang tags for a better user experience

When optimizing your content for search engines, it’s important to do your best to rank in the SERPs. This helps people around the world find your business.

Ultimately, the goal of hreflang tags is to provide customers who speak different languages ​​or live in different parts of the world with content designed for them.

This article was originally published in March 2021 and has been updated to be comprehensive.

SEO audit



Source link

Leave a Reply