Blog

Six reasons Google isn’t sure about where you are – are you using the Hreflang tag correctly?

The number of sites we encounter that are telling search engines contradictory information about where they are, and what language they are written in, never ceases to surprise us The hreflang tag is a really useful tag which can be placed in the <head> section of your website to allow the search engines to better understand the international content on your site, to ensure that the correct content, in the correct language appears in the search results for the correct country. It also helps to ensure that any content duplicated across different regional sites is not seen as a negative by search engines.

In this blog I will highlight some of the core issues we’ve found to help you avoid these when you take your website international.

1. Placing code in the wrong place

As mentioned above, the hreflang tag goes into the <head> section of all pages of the site. Make sure when you are implementing these that your code does appear in this section and not in the <body> section of the site.

2. Only having one language visible

One of the core functions of the hreflang tag is that it is supposed to show the search engines the different language/country specific versions of a piece of content. One common mistake we see when auditing an international website is the language of the site is only referenced in the hreflang tag.

This doesn’t give search engines the alternative versions of the page but just the version they have already found. This won’t help you get your language sites indexed, so make sure you reference each and every language/country version of your content on each and every version of that page. An example of a page referencing four languages can be seen below – this exact code would be present on every version of the page it references.

<link rel=”alternate” href=”http://www.example.com/” hreflang=”en-gb” />

<link rel=”alternate” href=”http://www. example.com/us/” hreflang=”en-us” />

<link rel=”alternate” href=”http://www.example.com/it/” hreflang=”it-it” />

<link rel=”alternate” href=”http://www. example.com/de/” hreflang=”de-de” />

3. Mixing up country and language codes

The format of the targeted language and content shows the language first and then the country. If you want to target a language worldwide you can just use one code. Make sure you use an accurate country code, and don’t mix up country and language codes – for example EN is the language code for English. We’ve seen people using AT for Austrian which isn’t a language – In Austria they speak German so the Language/Country code for Austria is ‘DE-AT’.

If you are interested in codes to use for these then refer to either the ISO 639-1 or ISO 316601 Alpha 2 lists.

4. Linking to the homepage from every page

Similar to issues we’ve spotted with the use of the canonical tag, we’ve seen instances where the site CMS automatically inserts the homepage URL for each country’s hreflang tag instead of the page that should be being referenced. This means that you are telling search engines that the alternate version of any page on your website will be the homepage and not the specific content.

5. Linking to different pages from the same content

One of the most common issues highlighted by Google in Webmaster Tools is that the page referenced in the hreflang tag does not link back to the same page.  For example on the page www.example.com/it/services, there is a hreflang tag to the Spanish services page here: www.example.com/es/services.  However, on the Spanish page the hreflang tag for the Italian Services page is www.example.com/it/pages/services.

For a hreflang tag to work correctly you need to ensure that each language version points to the same version of the page in each language. This will create a consistent message for the search engines to get a better understanding of your content internationally.

6. Misuse of X-Default

The hreflang tag offers the option to set up a tag which references a splash page for language selection. For example if your homepage (www.example.com) shows a splash screen which then allows people to select which country they want to view, this is when you would use the X-Default tag.

We’ve seen a number of sites which use the X-Default hreflang tag to show the primary language of the business – for example a UK based business might use the X-Default tag on the www.example.com/uk site. This is not correct and won’t help with internationally targeting the UK version of the site.

 

A note about sitemaps
It is also possible to place the hreflang tag in your sitemap.xml file. If your website does this and has them listed in the <head> section of each page make sure that the pages referenced in both the sitemap and on page match. If the language/country versions listed in each location are different it, will confuse the search engines.  Ideally it’s probably best that you don’t have hreflang tags in both your code and your sitemaps to ensure that you don’t accidently create issues for your site.

If you need help reviewing your hreflang tags please contact Oban International on info@obaninternational.com or call +44(0)1273 704 434 to find out how we can help you target your website internationally.