301 redirects by language not by IP, this makes so much more sense to me than the country IP redirection, when I was on location consulting for a Danish Bank a few years ago it always annoyed the hell out of me every time I went to the site that I got the co.uk in England but the Danish version in Denmark (In Danish so I couldn’t read it and I couldn’t even change it to English), Recently this issue came up again so here is my advice…

SEO’s should try to get their clients to use 301 redirects not by country but by language, so serving the correct content using Browser Language and not the country you are sitting in! These settings are sent by most of today’s browsers in the HTTP Headers, so you can use something like :


$language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
echo " Browser Version = ";
echo $language;
$language_short = substr($language,0,2);
echo " Short Version = ";
echo $language_short;
?>

My browser returns Browser Version = en-gb, Short Version = en – you can check yours here

You will need to strip it down to a short code Var due to the ability to set en-gb or v en-ca or you will have to create a large array etc..

browser-lang

Now you have your short code you can redirect and drop a cookie with the short code, I recommend you do that because you may want to let the user decide what language they want to read you site in ;) by anchor text links like Français or Deutsch to the relevant translations you can allow the search spiders in and allow the user to change the cookie.

OK so that handles the users correctly and the real benefit here is you don’t have to cloak Googlebot to get them to read all the foreign pages like you would if you were doing IP redirection.

Now we make it clear to Google that this is the French version of the website by using the appropriate Meta Tags on each language version of their site such as:

Implement the language Meta Tag to the header of each Language, besides the English pages this should ensure the right language is served in each local version of Google fingers crossed.

If the User has no preferred language, or the preferred language is English they should be served the homepage and not the translated version. This will allow Google to Crawl the entire site and understand the different sections much more clearly because of the use of Meta Tags. Absolutely no IP cloaking or User Agent cloaking necessary

Dave

DaveN

10 Comments

  • 1

    Which is fine for those who have their language set up correctly, but is a major problem for the specific case of multiple same (or similar) language sites (UK, US, AU, IE, etc or French Canadian and France itself.)

    For example, just using the browsers on my machine now, I get GB in Chrome, Opera, Konqueror and IE8 and US in Firefox, Flock and Safari.

    Given that II use FF as my main browser, you could identify that I was in Honolulu whilst I am in London, which is a full 7230miles out.

    Manley | http://twitter.com/LordManley

    3rd August 2009 @ 11:19

  • 2

    Good point Dave!, I’m from the uk living in Italy and it causes me some much headache to always be redirected to the Italian version (or .it TLD) when in my browser, I’ve set my preferred language to EN :-(

    Chris @ Nozio | http://www.nozio.com

    3rd August 2009 @ 12:13

  • 3

    boo @Manley ;) but even if you have 5 languages set trimming give you the primary one

    DaveN

    3rd August 2009 @ 12:17

  • 4

    Of course you only get 1 language per browser – If you check your Language across the variety on your machine, I bet you are identifying yourself as a US browser with at least one of them, right now.

    http://show-ip.net/browserinfo/

    Users just don’t bother to change defaults that often.

    Manley | http://twitter.com/LordManley

    3rd August 2009 @ 12:29

  • 5

    @manley but it doesn’t it get set when you install the OS well In IE it does.. try this http://www.davidnaylor.co.uk/bcheck.php what is your short version.

    DaveN

    3rd August 2009 @ 12:35

  • 6

    EN, but of course that does not help with US, AU, IE, UK users who all use EN.

    Manley | http://twitter.com/LordManley

    3rd August 2009 @ 14:37

  • 7

    [...] at brugeren alt andet lige får en konsistent oplevelse uanset hvor han befinder sig – se Dave Naylor’s blog for mere info om denne [...]

    Websites med flere sprogvarianter

    4th August 2009 @ 07:45

  • 8

    Some very good points, but I wonder if a combination of language-based redirects and IP-based redirects might not provide the best of all worlds. Let the browser language “win” and dictate the redirect in unambiguous cases.

    Treat cases where there are multiple “versions” of the same language (e.g. US and UK English) as special cases, and serve English but refined by the country the IP address maps to. So even if the browser identifies itself as en-us, serve UK English content if the visitor is visiting from the UK (but if they’re visiting from France, serve US English content as France isn’t an English-speaking country in the first place)

    Edwin Hayward | http://www.memorabledomains.co.uk/

    4th August 2009 @ 09:58

  • 9

    @Manley – this is about languages, not really serving different content to different countries, so all those users (US, AU, IE, UK) would want English.

    Chris

    4th August 2009 @ 10:37

  • 10

    Thanks for the information. I am wondering if this implementation you mention is similar to a htaccess language redirection implementation.

    anna

    22nd September 2009 @ 10:11

Write a Comment

*

*

*

Hear me speak at SES London 2010 Subscribe
to the David Naylor feed
Follow
David Naylor's Twitter feed

View Dave's Blog