Read this article to understand what Magento 2 hreflang tags are and how it can help your international business!
As you know, getting on the path of international expansion requires a thought-out international SEO strategy.
If you have a multiple-language website, can you show your international customers the right store view that matches their language? Yes, Hreflang is the answer.
Hreflang tags are created as a perfect solution for any websites that have multiple versions of different languages. It allows bringing the potential shoppers to the content and offerings that match their language.
Yet, do you know what Magento 2 hreflang tags are and why your eCommerce websites need them?
In this article, I’ll help you understand its meanings and application in SEO for Magento 2.
READ MORE 5 Best Magento 2 SEO Strategies to optimize your website effectively.
I. What Are Magento 2 Hreflang Tags?
Table of Contents
Some people may wonder: Are hreflang tags the same as meta tags? The answer is no.
Hreflang is a technical solution for sites that have similar content in different languages to target multiple locations.
Long story short, if you are running an international business in various languages or want to sell in various countries, the implementation of these hreflang tags is essential.
How Magento 2 Hreflang Tags Work?
The hreflang attribute (also referred to as rel=”alternate “hreflang=”x”) informs the language you use on a specific page.
You can understand that hreflang tags are a type of method that marks up any pages with similar meanings but different languages and regions.
It’s also referred to as rel=”alternate “hreflang=”x”.
Thanks to hreflang tags, Google can understand what language your content is written in. From there, when anyone searches in a specific language, the search engine will lead them to pages with the matching language.
There are three common ways of implementing hreflang tags:
- Content with regional variations like en-us and en-gb.
- Content in different languages like en, de and fr.
- A combination of different languages and regional variations.
It’s confirmed that hreflang tags are fairly commonly used to target different markets that use the same language.
For example, to differentiate between Germany and Austria. Or between the US and the UK.
For more information about how the hreflang tags work, make sure to take in consideration the official Google instructions.
II. Why Are Magento 2 Hreflang Tags Important To Ecommerce Websites?
The reason is quite simple.
I’ll explain…
To attract customers from many different countries around the globe, lots of eCommerce websites already prepared pages in multiple languages.
Hreflang tags are a technical solution for Magento multi language SEO with similar content. Therefore, to redirect visitors to pages that have a suitable language, the hreflang tags are implemented.
For example:
Your store has a ranked page in English on Google and the same page in German.
Say a client finds your store on Google, yet instead of showing the German page, Google show him your English ranked page. To let Google shows him the German page, you’d need to implement the hreflang tags.
When the Magento 2 hreflang tags are applied, that German client would see the German page and if he clicks the link, he’d be redirected to the German version of the page instead of the English one.
Same example:
So we understand how it works, and what benefits Magento multi language SEO, yet isn’t it the same as 301 redirects?
No, it’s even better.
How?
Hreflang tags also prevent duplicate content issues that would very likely affect your SEO result. Especially if you want different prices in two countries for the same product within the same product pages.
And don’t mistake hreflang tags with 301 or 302 redirects since it doesn’t redirect your website itself.
The hreflang tags leave a signal to Google. And then, it’s Google that leads users to a suitable version of your store.
And it’s all the same for Magento 2 websites if you get yourself a multi-language store.
Splendid!
III. Does Every Magento 2 Website Need Hreflang Tags?
Various situations make Magento 2 hreflang tags become a must for your website.
Your store needs to implement the hreflang tags only if:
- The Magento store has similar content in different languages.
- Your content is written differently for each region.
For instance, have you ever found yourself in the same popular situations as below:
- An eCommerce website that has three English versions: one for the USA, one for the UK and an international one.
- A website that is available in 3 different languages: English, Chinese, and French.
- A worldwide eCommerce website that has different variants for each continent: Asia, Europe, and America.
- A website that has different local languages in the same country.
If you’ve been in one or more similar situations, then there’s no doubt that the Magento 2 hreflang tags are a must for your store!
IV. How To Manually Setup Magento 2 Hreflang Tags?
It’s a pity that default Magento 2 doesn’t have the hreflang tags feature. Yet we still can implement it via either coding or Magento 2 SEO suite.
Below are three common ways to manually implementing the hreflang tags. You could use some help from a developer to get it working.
1. XML Sitemap
Usually, you’d experience certain technical issues with Google Search Console when implementing the hreflang tags on the XML sitemap. It’s due to the nature of Google processing data.
Yet, developers prefer to use XML Sitemap files when implementing global websites with hreflang tags within each page’s HTML source code. Hreflang annotations are commonly believed to create more problems in the XML Sitemap than in the site header code section.
2. HTTP Heading of Each Page
This approach certainly has an advantage in comparison to the XML Sitemap files, Google is continuously collecting information from the HTTP header.
Even for URLs that lack native source code, you can set up HTTP headers for each of them, not to mention even for PDF files and other non-HTML files.
However, the method is quite complicated to use, and it’d only cause more troubles and difficulties than advantages.
3. HTML Header of Each Page
This method is quite simple, but it has some disadvantages, particularly when using the value of x-default.
Therefore, if your home page is intended to redirect customers based on the language and location specified from the browser, I would suggest that you consider using the first two methods.
Here is an example for using Magento 2 Hreflang attribute:
<link rel="alternate" href="http://example.com/" hreflang="en" /> <link rel="alternate" href="http://example.com/en-gb/" hreflang="en-gb"/> <link rel="alternate" href="http://example.com/en-au/" hreflang="en-au"/>
V. How to setup Hreflang Tags with BSS Magento 2 SEO Extension?
In case you don’t want to do all the hard work, you could use Magento 2 SEO suite to set up the hreflang tags in Magento 2 quickly and better Magento multi language SEO.
BSS Commerce Magento 2 SEO suite stands by you to eliminate all the duplicate content issues:
- Add the hreflang tags for each store view.
- Freely selecting languages and countries for a store view.
- Ability to enable the hreflang tags for the homepage, product, category or even CMS page.
Beside addition hreflang tags to optimize Magento multi language SEO, this Magento 2 SEO suite also supports and adds various exclusive features for better ranking results of your store:
- Rich snippets added to highlight websites on SERPs.
- Better site navigation with advanced breadcrumbs.
- Support social shares via Open Graph and Twitter Card.
- Advanced XML and HTML sitemap generation.
- Duplicate content elimination by Canonical tag.
- Meta tag auto-generation for products and categories.
- Name & ALT tag generation for images.
- Additional H1 for pages.
- 301 redirects & external links support.
- Useful Magento 2 SEO suite report and analysis toolbar.
DON’T FORGET to have a look at other Magento 2 extensions provided by BSS Commerce.
After getting it with the help of our support team, you’d need to set up the hreflang tags.
How?
It’s simple. Just follow my instruction:
- Navigate from the backend menu to Stores then click on Configuration.
- Scroll down and select the BSS Commerce SEO. Select HREFLANG Tag Support.
- By default, you don’t need to change any other settings since they’re all turned on. You could turn any of them off if you want by switching from Yes to No.
- To add Hreflang for Store View, select the Language and Country as your desire:
- For example, to add hreflang for any visitors who speak French that come from France, I choose French and France as language and country.
- After selecting them, I simply press the Add button.
Once you finish the setting for Magento 2 SEO suite, the hreflang tags will be placed automatically at the assigned store view and page type. Visitors who click on your page’s result on Google would be redirected to the appropriate store view.
Quite easy to have a Magento multi language SEO website, isn’t it?
VI. Mistakes You Should Avoid When Using Magento 2 Hreflang Tags
According to the Search Engine Journal’s article, it’s critical for an online business to avoid the following mistakes when setting hreflang tags:
- Incorrect hreflang language settings.
- Hreflang tags conflict with the page’s source code.
- Invalid hreflang values.
- Pages without any hreflang attributes.
- Set hreflang tags for a one-language or one-location-target website
It’s also unnecessary to implement the hreflang tags for the website that targets only one location or isn’t multi-language.
V. Summary.
If your store has decided to go international, then appropriate Magento 2 hreflang tags are more than needed for your eCommerce website.
Either coding manually or using our Magento 2 SEO suite, the hreflang tags have such importance that it’d affect both your potential customers and your SEO ranking results!
Have a look at our comprehensive Magento SEO guide for more information!
Got any questions or suggestions? Just leave your recommendations below and we’ll answer them!
BSS Commerce is one of the leading Magento extension providers and web development services in the world. With experienced and certified Magento developers, we commit to bring high-quality products and services to optimize your business effectively. Furthermore, we offer FREE Installation – FREE 1-year Support and FREE Lifetime Update for every Magento extension.
CONTACT NOW to let us know your problems. We are willing to support you every time.
Furthermore, TAKE A LOOK at our Magento Development Services here!