Avoid These Hreflang Mistakes
The Rel=”Alternate” HREFlang=”xx” element is a life saver for global website owners. Especially if you have multiple sites in the same language, and that each site is targeting different country, you’ve got to implement Href Language element in order to ensure the appropriate local version is what shows up in local searches.
What is Hreflang tag, and what does it do?
“Hreflang” tag is the attributes to serve the correct language or regional URL in Search results.
Google and most of the major search engines look for certain signals in your website and web pages to determine which country your web pages are suitable. The signals includes (but not limited to), ccTLDs, hosting location, and language. It means that if you have global sites set up as either sub-domains or directories under the same domain such as “yourdomain.com/xx/”, the search engines would have problem determining the correct target market for each sub-domain or directory.
For example, your sites for US, UK, India, Australia, and Singapore are all in English with very similar content, if not exactly the same. You have separated them by sub-domains such as “us.yourdomain.com” or directly such as “yourdomain.com/us/”, but having “us” in the URL doesn’t mean it’s for the US market to the search engines. This is why you may experience that your UK site shows up in the search results for US or India.
With “Hreflang” tag, you can specify that “yourdomain.com/us/” is created for USA, “yourdomain.com/uk/” is created for UK, “yourdomain.com/sg/” is created for Singapore, and so on.
How do you implement Hreflang?
There are multiple ways for you to implement Hreflang annotations.
- Add language elements in <Head> section on HTML files. It would look like:
- <link rel=”alternate” href=http://www.yourdomain.com/us/” hreflang=”en-us” />
- <link rel=”alternate” href=http://www.yourdomain.com/uk/” hreflang=”en-gb” />
- <link rel=”alternate” href=http://www.yourdomain.com/sg/” hreflang=”en-sg” />
- <link rel=”alternate” href=http://www.yourdomain.com/au/” hreflang=”en-au” />
- Create XML sitemaps
- Now that Google is preaching for faster page load speed, it doesn’t make sense to add extra lines of codes to each page. It may not be too bad when you only have 2-3 variations to add. But if your site has more variations than that, you should use a sitemap. I’ve seen a page with 100 lines of hreflang annotations on each page, weighing down the load speed. Because it’s a separate file, it would be much easier to maintain the sitemap file than the lines added to the pages. For more information about how to create a language sitemap, see https://support.google.com/webmasters/answer/2620865.
Common Hreflang mistakes
As mentioned above, Hreflang setting is quite simple. But many websites have problem with it. Here are some of the common mistakes I’ve seen with Hreflang implementation.
- You forgot to include all language and country variations you have on your site
- You used wrong language code and/or country code
- “jp” instead of “ja” for Japanese or “uk” instead of “gb” for country
- You mapped wrong pages to hreflang
- Example: <link rel=”alternate” href=http://www.yourdomain.com/jp/” hreflang=”en” />
- You listed URLs that don’t exist on your site
- This happens when US site has 100,000 pages, but your ES site only has 75,000 pages, or some of your sites has completely different URL structures.
- Canonical tag on the page gives different instruction
- Hreflang tells Google there are language/country variations for the page, but canonical points to completely different page telling Google to ignore other variations. Example:
- <link rel=”alternate” href=http://www.yourdomain.com/us/” hreflang=”en-us” />
- <link rel=”alternate” href=http://www.yourdomain.com/uk/” hreflang=”en-gb” />
- <link rel=”alternate” href=http://www.yourdomain.com/sg/” hreflang=”en-sg” />
- <link rel=”alternate” href=http://www.yourdomain.com/au/” hreflang=”en-au” />
- <link rel=”canonical” href=http://www.yourdomain.com/” />
- Hreflang tells Google there are language/country variations for the page, but canonical points to completely different page telling Google to ignore other variations. Example:
If you implemented Hreflang, but still experiencing the problem, double check to make sure that you didn’t’ make any of the mistakes mentioned above. Note that Google’s Hreflang tester only tests if it has all elements, and doesn’t check to see if it’s correct for your site or not as it doesn’t crawl your site to find out what URL structures, directory names, etc. you use on site.
Having the right language and country pages shown in the search results could bring a huge returns to the business. It’s great that Hreflang works among different domains, too. If you own sites targeting different countries, make sure that you use Hreflang.