By

rel=alternate setup for multilingual websites

Google logo

Coincidence would have it that on the day of the first post on SEO Trench, which highlights some future blog entries – Google announce a new markup for the rel=alternate tag.

The tag allows the webmaster (you) to serve up very similar content to searchers in different countries without worrying about duplication.


Last Updated: 21:54, Tuesday 29th May 2012

You may be interested to check out some of the rel=alternate examples following on from this study and XML sitemap integration.

Overview

Imagine your website has two subfolders, one ‘/at/’ and the other ‘/de/’. The subfolder ‘/de/’ targets a German audience, whilst ‘/at/’ targets an Austrian audience – simple enough so far?

The problem is that it can be very difficult serving up unique content on products and services that as essentially the same in Germany or Austria. So how can we inform Google that the copy is suitable for both countries BUT the content is slightly different (for example office address or phone numbers).

rel=alternate comes into play

This scenario would require the use of the rel=alternate tag. Using the German and Austria examples above, say we have the following two URLs:

  • http://www.example.com/de/product-1.html
  • http://www.example.com/at/product-1.html

Both pages contain the exact same content, in terms of product description and pricing – but differ for contact details. So the pages are 95% the same – a content duplication problem. However, to combat this a canonical tag should be placed on one of the URLs pointing to the other – in this instance the Austrian URL will contain the following canonical tag:

<link rel="canonical" href="http://www.example.com/de/product-1.html" />

In isolation, this will tell Google that the canonical version is the German subfolder, meaning that the Austrian page will drop out of the SERPs. This can make for a bad user experience as an Austrian audience would have to view the German offering. However, with the addition of the following code to the German version, Google will be able to serve up an ‘alternative’ version for an Austrian audience:


<link rel="alternate" hreflang="de-AT" href="http://www.example.com/at/product-1.html" />

That should be it. Your German visitors will be able to view German content, whilst your Austrian visitors will indeed be presented with your Austrian offering:

rel alternate diagram setup

Examples of the tag in action

Ok, so here is what I thought I would do – I’m going to set up three pages that have 95% of the same content. The URLs are:

  • http://www.seo-trench.com/lang/uk/hello.html
  • http://www.seo-trench.com/lang/au/hello.html
  • http://www.seo-trench.com/lang/us/hello.html

You can view the UK, US and Australia right now and check out the back end code to view the markup. I will be running a following up blog in a couple of weeks to highlight the results. If you have any questions or feedback, please do not hesitate in dropping me a comment.

Edit- It now appears that you need to add the “rel=’alternate’” tags to all pages included, meaning that the US and AU pages need to include the set. I am also going to modify the META description data to be generic rather than country specific.

Edit- I’ve also setup an example on another domain to test for cross domain compatibility. I do not see why this should not work, but it has to be tested. The page is for Canadian visitors.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>