Recently, we have rolled out an update of SEO Suite Ultimate Magento extension. The new version got a set of features that let you add, adjust and manage hreflang tags.
In this post, I’m going to give you a detailed explanations of the new functionality, and tell how to efficiently use it for your Magento store.
What is the hreflang tag used for?
When your Magento store starts receiving a big amount of foreign traffic, it’s time for you to implement localized versions of your store. But you should be aware of the fact that this can trigger duplicate content issues. Being set for different languages, separate domains, subdomains or subdirectories may be treated by Google as duplicates.
To avoid duplicate content issues, you need to inform Google that all these pages are just the alternate versions of the original.
The hreflang tag will help Google understand which version of your website should be shown in which country. Thus, the search engine will deliver the correct language version of the site to the targeted foreign audience.
To find more info about this tag, follow this link.
How to implement Hreflang tag with SEO Suite Ultimate
First, you need to enable the Alternate URLs in the Magento admin panel. To do that, follow this path:
System – Configuration – MAGEWORX – SEO Suite – SEO Alternate URLs
Selecting Alternate ULRs Scope
Next, you need to select the Alternate URLs scope. There are two options available for that
If you have different websites for each targeted language, select the ‘Global’ one. If all your languages are created as separate Store Views (within one website), switch to the ‘Website’ value.
Enabling Alternate URLs settings
To enable the alternate URLs on your site, choose ‘Yes’ in the ‘Alternate Hreflang’ dropdown. Once enabled, you will see the additional settings to configure.
By default, the alternate URLs will be added to all your pages: products, categories and CMS. You can enable/disable them on any of these types of pages separately:
Language settings for Alternate URLs
Quite often, you may need to configure your Magento site so each Store View had a different default language.
For example, you have two Store Views with English and German default languages. By default, the alternate URLs will use the codes of these languages, and you will get hreflang=”en” and hreflang=”de”.
However, if you need to use a language different from the one specified for the Store View, you can disable the ‘Use Language Code from Default Locale’ setting and select the language for the alternate URLs manually:
To choose a language for each Store View, select the View in the Scope drop-down (located above the left configuration menu) and set the necessary language.
To change the Store View default language, go to System – Configuration – General – Locale Options – Locale.
Sometimes, you may want to specify different countries for the same language. For example, to show one page for English speakers in Canada and the other page for your audience for United States. In this case it’s necessary to add a country code to the alternate URLs.
If you enable the country code in the extension, it will be taken from the default country for each Store View:
To specify a different country, disable the ‘Use Country Code from Default Country’ setting and manually choose the country you need:
Thus, the module will let you choose the necessary language and country (if needed) will allow to create their correct combination.
Adding the alternate URLs to CMS pages
One more challenge you may face when optimizing your website is connecting localized versions of CMS pages.
In order to make different translations of the same CMS page, you will have to create several CMS pages (one for each language). Since they are different pages, they will have different IDs and most likely — different URL keys. Hence, the system won’t be able to determine that you have the localized versions of the same page, and won’t add alternate URLs.
SEO Suite Ultimate Magento extension allows you to connect these pages by URL keys or a hreflang attribute.
If you create different translations of the CMS page and keep the same URL key, you will be able to connect them by the URL key. In this case, the extension will locate all pages with the same URL keys, group them together and add the correct Alternate URLs.
If you have different URL keys for your CMS pages, you’d better connect them by the hreflang attribute. SEO Suite Ultimate will add a new attribute for each CMS page, where you can enter the unique value for the same page. Thus the extension will help you show that these pages are actually the same page but in different languages:
Setting the X-Default
Our SEO extension also allows you to choose the X-default attribute (you can find more about what it is here).
While configuring the extension for our customers, we found it quite time-consuming to test the correct alternate URLs. One needs to open each page in the frontend and check its source code.
To make this process easier we’ve added the overview of the alternate site URLs right in the backend:
I believe that this functionality of SEO Suite Ultimate will be of great help with setting and managing hreflang tags on your Mageto website.
If you find any questions on this functionality, or have any ideas on how we can further extend it, please let us know.
Fancy the extension’s new feature?