Technical SEO

Hreflang

Shahid Maqbool

By Shahid Maqbool
On Jul 3, 2023

Hreflang

What is Hreflang?

Hreflang is an HTML attribute used to specify the language and geographic targeting of a webpage.

It is particularly useful for websites that have multiple versions of the same page in different languages or for different regions.

The main purpose of hreflang tags is to help search engines like Google, Bing, Yandex and many others to understand the language and regional variations of a webpage, so they can serve the most suitable version to users based on their location and language preferences.

While Bing does not place as much emphasis on hreflang, it still recommends its use. Baidu, however, does not rely on hreflang tags - focusing instead on the content-language HTML attribute.

How does it look?

Here is how hreflang is typically formatted:

<link rel="alternate" hreflang="x" href="https://yourwebsite.com/alternate-page" />

This code is composed of several key components:

link rel="alternate": This part of the tag tells the search engines that the link provided is an alternate version of the current page.

hreflang="x": Here, 'x' signifies the language code of the alternate page and tells search engines the language used on the alternate page. For example, "en" for English, "ar" for Arabic, etc.

href="https://yourwebsite.com/alternate-page": This is the URL of the alternate page. It directs the search engine to the location of the alternate language version of the webpage.

Related Articles

Leave a reply
All Replies (0)