For brands who are looking to make a mark in the international market, learning how to use hreflang tags is a must. Brands that want their websites to be accessible and understandable for people belonging to different regions must use hreflang tags.
Hreflang tags help search engines in identifying which version of the website it should show for users of a specific region. If you want to show the Arabic version of your website to your users in Saudi Arabia, your hreflang tag will help the search engine in completing this task.
Defining Hreflang tag
Hreflang is an HTML attribute, it is a tag that lets the search engine know when to show which version of a website in terms of language.
Websites that only want to target local customers, need not concern themselves with learning the correct usage of hreflang tag. For websites that wish to target international and multiregional audiences, learning the optimal usage of the hreflang is a must.
Hreflang tag helps search engines in displaying similar content in different languages to people belonging to different geographical regions.
Hreflang tag helps in showing Spanish content to Mexican people and Arabic content to Saudi Arabians.
Importance of hreflang tag
Translating your content in different languages will take a lot of time and resources. If you are spending this much time and resources for this purpose, you’ll want Google or other search engines to show the correct version of your website to the intended people.
Google uses hreflang for identifying the correct version of a website for users living in different geographical regions.
But if your target audiences are Bing users, using hreflang tag may not be a good idea because Bing doesn’t recognize hreflang tags.
The more inclusive your website is in terms of language, the more international audience it will attract. Multilingual websites also have lower bounce rates thus resulting in better SEO and search engine rankings.
I hope you have got a general idea about the functions of a hreflang tag.
Now let’s move onto the technical aspects of things
Placing Hreflang tag in the head of your HTML document
The head tag of an HTML document comes before the body tag and it holds the title and Meta description along with other elements.
It is not necessary to add the hreflang tag in the head of your HTML document, but it is a method that is more commonly used.
This method is not used by large or bulky sites because it can slow down the loading time for them. If you are using a lot of languages for your website, placing the hreflang tag in the head of your HTML document can increase the loading time of your website.
If you choose to place the Hreflang tag in the head of your HTML document, you’ll have to update it every time you remove or add a new page.
<Link rel= “alternate” hreflang=en-us href=https://yourwebsite.com/>
If you include this tag in the head, the web page you have mentioned in “href” will get translated to the United States version of the English language.
Not all documents are HTML doc type. Hreflang tag for non-HTML documents can be placed in the Https header. This option is good for small websites but it will slow down big websites that are using a lot of languages.
<https://yourwebsite.com/file.pdf> ; rel=”alternate”; hreflang=”en-us”
This the tag that will translate a pdf doctype in the US version of the English language.
To add the hreflang tag in the https header, the format of your hreflang must resemble the format given above.
Adding the hreflang tag in the XML sitemap of your website
For adding the hreflang tag to the XML sitemap of your website you’ll have to use an xhtml link attribute. Many websites do not have a sitemap and this option is not usable for them. If your website doesn’t have a sitemap you can always add it to your existing website. Using a sitemap for your website can also help with its optimization.
A sitemap will also help make changes to your website, you can make changes directly through the sitemap without individually opening each web page.
If the hreflag tag is present in the XML sitemap of your website you won’t have to add it individually to every single web page.
<?xml version=”1.0″ encoding=”UTF-8″?>
This tag may seem a little lengthy but you’ll only have to add it once your website. If you make any changes to your webpages, the hreflang tag present in the sitemap will be automatically applied to the changed web page.
Once you learn the basics of these HTML tags, you’ll be able to automate most of the process.
Why you need to learn the proper implementation of a hreflang tag
Learning how to use Hreflang tags and adding an individual hreflang tag for every language can be a bit burdensome.
But at the end of the day, it will provide immense value to your website.
You’ll have to learn how to use hreflang for different languages and geographical locations. You’ll have to code each hreflang tag individually.
Correct implementation of hreflang tag will make your website more user friendly. Hreflang tags can also be helpful if you haven’t identified a specific language for a region.
Many websites also provide an option to change the language manually. This feature helps users in choosing the language they prefer despite their geographical location.
You can use a standardized version of your website for people who want to manually choose the language.
A default page should be set up for countries with no specified language.
<Link rel=”alternate” hreflang=”x-default” href=https://yourwebsite.com/>
This tag will help Google or other search engines in sending users to the default page you have set up.
If you haven’t specified a language for people living in Qatar, any user from Qatar will be directed to the default page of your website.
Always choose a language that is widely understood for your default page.
Many websites use the English language for this purpose.
British and American English only have slight differences. If you add the US and the British version of a blog on your website, search engines like Goggle can mark it as duplicate content. This not only applies to English-speaking countries. Urdu that is spoken in Pakistan is very similar to Hindi that is spoken in India.
Arabic that is spoken in Qatar is very similar to Arabic that is spoken in Saudi Arabia.
When you add a hreflang tag it tells the search engine that the content is for the sake of catering to users who speak different languages.
If you have an e-commerce website, it is recommended to add relative currencies to different versions of your website. For example, add INR for your Indian audience and add USD for your American audience.
In short, a hreflang tag helps search engines in identifying content that is similar but is not duplicate.
How to specify a region when using a hreflang tag
It is fine if you just identify a language in your hreflang tag leave it there. If you want to take the usage of hreflang tag a step further you can also specify the region in your hreflang tag. You’ll have to add a two-letter code for identifying the region.
“US” is the code for the United States. “UK” will be used for the United Kingdom.
For targeting English speakers in UK
<link rel=”alternate” hreflang=”en-gb” href=https://example.com/uk/>
You can target English speakers of the USA by replacing “UK” in the tag with “USA”
By replacing the language and country code you can target any audience living in any region.
Using multilingual SEO can boost organic traffic for your website. In order to optimize your website for multiple languages you’ll have to learn the proper usage of hreflang tag. Hrefang tag ensures that Google or other search engines display the correct version of your website to your intended users.
You can add hreflang tag in multiple ways, choose the one that best suits your needs.
Hreflan tags can also be used to target locales.
Is your website optimized for multilingual and multiregional usage?
Optimizing your website for multiple languages will boost your website’s organic traffic. Correctly implementing hreflang tag is crucial for this purpose.