SurgeGraph’s Year End Sale and Bulk Generation are live! Write 50 articles in one go now.
Get Bulk Generation – Save Up To $105

Hreflang Attributes And Why They Are Important

Hreflang is a HTML attribute that inform search engines of the language on your page. Hreflang helps SEO by avoiding duplicate content and user experience issues. There's 3 ways to implement hreflang

If you have a website, then the main goal is to reach as many people as you possibly can.

Achieving this goal can be a little tricky, even though the internet offers global connectivity.

The main obstacle that stops many marketers from reaching a bigger audience is the language barrier.

hreflang usage statistic

Three million plus websites worldwide use English hreflang attributes.

And this number is steadily growing.

More website owners and online businesses want to get access to a bigger audience.

To achieve this, they have adapting to accommodate and improve their visitors’ user experience.

How do you accomplish this?

The answer is straightforward.

Although the process can be a little bit demanding: hreflang attributes.

If you are determined to provide your content to a broader audience, you have to create your content in said languages.

Translating your content into multiple languages while using hreflang attributes could help Google provide your content to audiences in their native language.

This strategy could help boost your outreach, traffic, and even conversions.

Therefore, if your website has content in multiple languages, I recommend that you use hreflang attributes.

What Is Hreflang?

Hreflang attributes are HTML attributes that inform search engine which languages you are using on your page.

They are technical solutions for sites that have their content in several languages.

They are useful for owners who want search engines to direct users to their website’s content in their languages.

Hreflang attributes help webmasters to clarify their audience’s lingual and geographical setting based on their target audience.

Hreflang attributes also help search engines such as Google adjust the content displayed based on these instructions.

Say for instance, Facebook.

For the social media platform to provide content for different people in different geographical and linguistic sectors, Facebook uses hreflang attributes to adjust its content to fit its audience.

Using hreflang attributes helps Facebook display their content in the right language to the right audience.

Why Is Hreflang Crucial To SEO?

Improves User Experience (UX)

Displaying content to users in their language helps users understand the content better.

This can be quite helpful in improving the users’ dwell time on your website and decreasing the bounce rate.

If a Japanese user wants to visit your website to buy some merchandise, it can be quite difficult for them to navigate your website if the content is displayed in English.

Unless they are proficient in the language or even average, they are more likely to give up and switch to a more user-friendly site.

However, if your content is displayed in the visitors’ native language, the chances are that they are more likely to spend a more extended period on your website.

And they may end up making a purchase.

Avoid Duplicate Content Issues

When you translate your content to a different language, you risk being penalized by Google and other search engines.

Writing unique content for each of your pages is less effective.

So, how do you go about tackling this challenge?

If you have two pages, one for the US audience and the other for your UK audience, the pages will look almost identical.

Google may see these pages as duplicate content.

You could use the hreflang attribute to prevent your website from being penalized for posting duplicated content.

The hreflang attribute acts as a signal.

This helps Google understand the relationships between these two pages.

How To Implement Hreflang Attributes

HTML Attributes

If you are new to using hreflang attributes, then using HTML attributes is probably the easiest way to go about the whole process.

What you’ll need to do is to add the relevant hreflang attribute in your web page’s <head> attribute.

For instance, if you have a website on SEO and have some posts that you’ve translated from English to German and Chinese, you could add the hreflang attributes to the head section as shown:





Modified result:

<link rel=”alternate” hreflang=”en” href=”” />

<link rel=”alternate” hreflang=”de” href=”” />

<link rel=”alternate” hreflang=”zh” href=”” />

<link rel=”alternate” hreflang=”x-default” href=”” />

There are no limits to the number of hreflang attributes you can add to your page.

However, this process can take a lot of  time and messy.

HTTP Headers

For non-HTML pages like PDFs, it isn’t possible to add hreflang attributes to the <head> section since there is no HTML.

Instead, you’ll use HTTP headers to specify the variant language in the documents relative to the users’ location.

Here is an example of how you may do it:

HTTP/1.1 200 OK

Content-Type: application/pdf

Link: <>; rel=”alternate”;hreflang=”x-default”,

<>; rel=”alternate”;hreflang=”en”,

<>; rel=”alternate”;hreflang=”de”,

<>; rel=”alternate”;hreflang=”zh”

XML Site Map

These can include the relevant markup that specifies a page’s hreflang together with its variants.

To do this, use the xhtml:link attribute.

Taking an example of the of our first three HTML variants, this will be the full mark-up:



<xhtml:link rel=”alternate” hreflang=”x-default” href=”” />

<xhtml:link rel=”alternate” hreflang=”en” href=”” />

<xhtml:link rel=”alternate” hreflang=”de” href=”” />

<xhtml:link rel=”alternate” hreflang=”zh” href=”” />




<xhtml:link rel=”alternate” hreflang=”x-default”

href=”” />

<xhtml:link rel=”alternate” hreflang=”en” href=”” />

<xhtml:link rel=”alternate” hreflang=”de” href=”” />

<xhtml:link rel=”alternate” hreflang=”zh” href=”” />




<xhtml:link rel=”alternate” hreflang=”x-default”

href=”” />

<xhtml:link rel=”alternate” hreflang=”en” href=”” />

<xhtml:link rel=”alternate” hreflang=”de” href=”” />

<xhtml:link rel=”alternate” hreflang=”zh” href=”” />


This process may look less efficient and even a bit too taxing.

However, it’s the most efficient way to implement your hreflang attributes.

The reason is that everything is defined in one single file.

You won’t need to make edits on multiple HTML documents anytime you make a minor change or remove a page.

Implementing hreflang attributes through sitemaps do not slow down your website, which is another tremendous advantage.

Common Hreflang Mistakes

Typos And Underscores

Simple typos and underscores may make it hard for your website to implement its hreflang.

It would be best to avoid simple errors such as imputing invalid country codes, using underscores (_) instead of hyphens (-), using country codes but missing language codes, etc.

If you make these typos, the chances are that Google will not understand the code, and it’s more likely to ignore it.

Your code may not work.

And you may end up reducing your website’s user experience.

The best thing to do is to ensure that you are extra careful when implementing these attributes.

Missing Self-Referencing Hreflang Attributes

Google suggests that each language version must list itself as well as other versions.

Google won’t penalize you.

But it is good practice.

And it may make it easier for your website’s visitors to navigate your website.

To fix it, you should go through the affected pages and add a self-referencing attribute using your preferred method.

Forgetting Bing

For hreflang attributes to work on Bing, you have to follow their separate guidelines.

What you should do to Bing’s attention is to specify the page’s language using lang=.

Then, indicate the intended audience using a content-language header.

En-UK instead of en-GB

As I mentioned earlier, when implementing hreflang attributes to your website, you should be extra careful that you use the right language and country codes.

According to Google, the value of hreflang attribute attributes is in the language’s ISO 639-1 format for the language and ISO 3166-1 Alpha 2 for the region.

Most users make one common mistake in denoting English speakers from the United Kingdom as “en-uk” instead of “en-gb.”

If you want to figure out which values you need to use, you could use this hreflang attribute generator to come up with attributes you could use.

When Not To Use An Hreflang Attribute

When You Have Duplicate Content In Different Languages

If you have duplicate content where most of it has been directly translated into different languages, you should not be worried since Google will not penalize you.

However, the search engine still recommends that you use hreflang attributes to help it crawl the pages.

The ranking of both these translated pages is affected by region.

Therefore, if you plan on using hreflang attributes to improve your ranking, you shouldn’t because it won’t work.

To build your rankings, you should link your translated versions to authoritative sites in the relevant countries.

If your website has any duplicate content, here’s how you could fix it.

Limiting Google Searchers From Other Countries

If you are very confident that you don’t want users from any other country, apart from those selected accessing your website, you don’t have to use an hreflang attribute.

It would be best if you used Google’s much more practical option.

Go to Google’s Search Console.

Choose your target country, and tick a geographical target in the check box.

It is the best idea if you are one-hundred certain that you don’t want any person other than those from the selected region gaining access to your website.

Optimizing For Bing Or Baidu Only

When you want to optimize your website specifically for Bing or Baidu, you could avoid using any hreflang attribute.

It’s is very unlikely for any western websites.

But it is quite possible.

And if you want to do it, you should follow guidelines set by Bing and Baidu respectively.

If you want to attract audiences from China, you should specify the language and the intended audience on the HTTP header level.

You could also optimize for Bing.

BiQ Tools

BiQ is a multipurpose tool that improves your keyword research, content optimization, and helps you with your rank tracking.

This tool can help you create content that’s specific to specific audiences in specific geographical locations.

BiQ can also be used to check your website’s rankings in said geographical regions.

The information gained from this analysis could help provide you with insights on how you can improve your site’s performance.

1. Finding Keyword Opportunities

BiQ’s Keyword Intelligence can help you find untapped local keyword opportunities in your set region.

You’ll first need to enter your keyword and then select the preferred location and language and begin the search.

Free keyword research tool to find local SEO keyword

BiQ will then provide you with a list of all the relevant keywords that the people in the said location are using.

The results may vary depending on the different demands.

However, the keywords obtained are displayed with meaningful metrics that’ll help you make a more informed decision.

You could sort out the keywords based on keyword value.

Higher value keywords will redirect more traffic to your site, and they’ll have much lower competition than low-value keywords.

Getting your keywords sorted out makes the process of selecting the right keyword much easier.

2. Checking For Rankings

If you have an eCommerce website that you’ve translated to French, you would like to know how you rank since the two webpage versions rank differently in different regions.

This information is quite critical, and you would need the best tool for analysis.

You could use BiQ Rank Intelligence.

To check for your rankings, you’ll have to input your URL into the rank intelligence and then select the country in which your audience is based.

BiQ will give you information on the keywords that your website ranks for and other important information such as the search volume, competition, cost per click, etc.

This information will inform you of what searchers are searching for and how they get through to your site.

It can also be helpful when you know how your site ranks to find better means through which you can improve your rankings and get more traffic.


Applying hreflang attributes to your web pages can be tiring and sometimes outright frustrating.

However, the hreflang attributes do have some undeniable advantages that should not be taken lightly.

The hreflang tags will help you reach a wider audience, which may improve sales.

The attributes also improve your visitor’s user experience as they browse through your site.

Which is great since a happy customer has a higher potential of making a purchase.

If you want to get more conversions, then hreflang attributes are the way to go.

Apply hreflang attributes to your webpages and boost your website both locally and internationally.

About Ken
A coffee aficionado who's fascinated with the world of digital marketing and SEO. When he's free, he'll be chasing plastic discs out on a field.