The hreflang is the meta-attribute that guides search robots around various versions of pages that target different countries. Simply put, when used correctly, this specification element helps Google index and serve the localised version of a website’s content to users who require an alternate language version. In this post, I will uncover the best practices for implementing hreflang, common mistakes made when implementing this, and how to avoid them.
Why you should implement hreflang
Hreflang helps the search robots to understand the right version of different country or language versions of a website’s cross-annotated pages, and makes them appear correctly in Google’s search results.
Hreflang does not override other geo-ranking factors that may make a page rank in the search results. So for example, hreflang is useful if you have a multilingual website that offers its content in more than one language. An example would include a Canadian business with separate websites on the same domain for both the English and French versions of its content. Another illustration of why hreflang is useful is that Google defines multi-regional content as a website that explicitly targets users in different countries.
This gets a bit difficult to wrap your head around because websites can be both multilingual and multi-regional; for example you could have a sports site with different versions for the USA and for Europe, with German, Spanish and Italian versions of the European site’s content. Understandably, being able to have the correct page shown to the local market can result in incremental traffic and higher engagement rates for a brand’s website.
How to implement hreflang
The hreflang can be implemented in two different ways:
- Meta element in the <head> tag (most common)
- Sitemap implementation for websites with numerous countries
It is highly advisable to apply only one mode of implementation, otherwise, this might cause confusion for search rankings.
It’s highly recommended to implement the last hreflang attribute as x-default. It signals to search engines that this doesn’t target any specific language or country, but considers it as default when no other page is better suited for the search query.
<link rel="alternate" href="http://example.com/" hreflang="x-default" />
The ‘x-default’ code should be followed by all alternate versions of the page one by one. It is also appropriate to add the self-referential URL first, meaning the first hreflang should be the alternate URL of the page requested.
<link rel="alternate" href="http://example.com/en-gb" hreflang="en-gb" />
<link rel="alternate" href="http://example.com/en-us" hreflang="en-us" />
<link rel="alternate" href="http://example.com/en-au" hreflang="en-au" />
Common mistakes in the hreflang implementation
Let’s have a look at common mistakes that occur when implementing hreflang:
- Return tags are missing: All country or language pages must be cross-referenced with each other. In the meta tag element, each version must be listed on each corresponding version. For example, if page A specified hreflang to page B, page B must specify the hreflang of page A. If it is not appropriately cross-referenced, then all of those annotations without cross-referencing may be ignored or not interpreted correctly.
- Incorrect language or country codes: Another common mistake is the selection of incorrect encoding language or region codes. In order to avoid making this mistake, always refer to ISO 639-1 format and ISO 3166-1 Alpha 2
- Combining both hreflang sitemaps and page tagging method: Always choose one method and not a combination of the two. If the site has few multiple language or few country versions just use the meta element method (e.g. US and UK English) and use xml sitemap implementation when the site has numerous language versions (e.g. US English, UK English, Germany German and Switzerland German, Brazil Portuguese and Portugal Portuguese).
- Hreflang will consolidate link authority: Once hreflang is correctly implemented across multiple top-level domains (TLDs) or sub domains, the most authoritative domain gains link authority. A good solution to consolidate link authority is to host multiple country versions in one domain with a folder structure. Again, you should build link authority to local versions of all countries to gain sufficient authority for each. Hreflang only supports your existing link authority.
- Hreflang does not fix duplicate content issues: If you have two pages in the same language targeting different regions, such as English in the UK and US, the content of those two pages may be similar, and therefore may be considered as duplicate; an issue we identified in a previous blog post. Keep in mind that correct ‘hreflang’ will not solve the issue. It is still possible that your UK page may outrank your US page, particularly if the UK page has significantly more link authority, and especially if it has links from US sources.
Hreflang tags will help to solve this issue only to a certain extent. They provide a technical structure that helps robots to sort out and understand your content. For a truly international site, a holistic marketing approach will be required and the site will need to build authority from each target country.
- Not using canonical tag together with hreflang tag correctly: In all pages, hreflang tags need to reference self-referencing canonical URLs. A self-referencing canonical URL is required along with hreflang to avoid duplication issues.
For example, if there are pages for en-gb and en-us then the canonical URL for UK would be: <link rel="canonical" href="http://example.com/en-gb" />
And for US the canonical is:
<link rel="canonical" href="http://example.com/en-us”/>
- Order of hreflang: The order of the hreflang tag is important as the code seen on the top has high priority. So the local ‘hreflang’ should be on the top after ‘x-default’.
- Not using absolute URLs: Developers often use relative URLs to make the code clean. However, it is essential to use and specify absolute URLs to make hreflang work.
For example, here is what NOT to do:
<link rel=”alternate” hreflang=”en-us” href=”/usa/” />
<link rel=”alternate” hreflang=”en-ca” href=”/ca/
Google wants to be able to crawl the entire URL path because an international website might be hosted in different domains, in subdomains, or in subdirectories.
Testing your implementation
Once you have implemented hreflang you should test it thoroughly to ensure everything is implemented correctly. Flang is an excellent tool for testing.
After a few weeks, test using the different countries’ search listings. For example, search for your brand name using one of the target country’s search engines. You could use the following example from an incognito window:
Hreflang implementation requires sound technical understanding and clear goals for your international marketing efforts. It is essential when it comes to distinguishing multilingual international businesses and supporting authority in the respective markets.
Do you want to fix issues surrounding search marketing? If you’re looking for support, why not contact our team of marketing experts to see how we can help? Get in touch via our website or via Facebook, Twitter, LinkedIn or Google+, we’d love to hear from you!
If you found this article interesting, why not take a look at our post about how to fix duplicate content, simply click on the image below: