Drupal multi-language SEO

Drupal 5, multiple languages using i18n and SEOpicture by capsicinaI'm trying something different here with this post: in order to see if we can reach a broader audience, I'm writing it in English.

As mentioned before, Drupal has quite nice out-of-the-box SEO features which can be improved using the right modules. There even is a handy SEO checklist module which not only tells you about these modules, but also other things - like w3c compliance.

Multiple languages
However, things become a little complicated when you use a multi-lingual setup of Drupal. The case I'm describing here is Drupal 5.x with i18n. Things will probably be a little easier in Drupal 6 because of its better multi-language support, but in Drupal 5 and i18n you have to watch out for some things.

Pathauto
There is a problem with pathauto in combination with i18n. Pathauto doesn't take the current-language into account. So you can't have a node with a translation having the same url - even though the URL isn't the same because it starts with the language prefix!

Example:
This is how pathauto would solve this problem now for a node with title 'example':

  • dutch version page: /nl/node/example
  • english version page: /en/node/example-0

It will add a '-0' string to make the second url different. Which is actually not necessary because you can see the url is already different because of the language prefix.

This problem is addressed and solved by using this i18n-pathauto module which basically gives you an extra token the [lang] which you can use in pathauto predefined settings. Nice!

Also, did you enable transliterations in pathauto? Chances are, that with multiple languages you will occasionally have special characters like ë or é in your title. And it's a good idea to have those mapped to accordingly to the corresponding character into the ascii-128 set. Otherwise they will end up urlencoded into ugly strings like %E9 or something.

Global redirects
Another SEO module which is currently not fully compatible with i18n is global redirects. There is a critical issue which causes an infinite loop when you try to switch the language on the frontpage. There might be a fix soon, but all the patches until now didn't work for me. Nice module though, good to avoid duplicate content.

XML sitemaps
If you want to submit your xml sitemap to Google or Yahoo, you can use the XML sitemaps module. However, as far as I can see there is no support for multiple languages. The generated sitemap will only be in one language. Personally I don't even think it's worth spending a lot of time on this one. XML sitemaps are mostly usefull for either gigantic sites with *a lot* of content or sites which are poorly crawlable and therefore need a map to find all the pages. All drupal sites we made were neatly crawled and fully indexed within weeks, so you might consider not submitting xml sitemaps or using a service like xml-sitemaps.com to generate a xml file.

(btw you might also check this post if you have problems with xml sitemaps not using the url aliasses)

Page title, nodewords, search404
These are the modules you will definitely want. Page title allow you to use a custom page title different from the one node-title. Nodewords allows for meta-description and meta-keywords and search404 displays a neat search screen whenever the sites encounters a 404 - with the keywords from the broken url already filled in. Essential when your url's have changes (and you deleted the old alias) and search engines are still displaying the old path.

Open Coffee

Read More »

About

This is the company blog of
Drupal specialist Merge.nl

We are located in Breda (Netherlands) and build websites using Drupal. More about us.

Content on this blog is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License.

Creative Commons License

Recent Comments

Social