Multilingual SEO Fix
This page was written in English, please see the English version for the most accurate code.
There is a big problem with multi-language URLs in prestashop.
URLs in multiple languages are appearing without the /lang-xx/ in them, which make search engines assume they are in the default language, for example:
Notice how both are pointing to the same directory, and for search engines, both URLs will open up in English, even though the second one is meant to be in French (since search engines don’t have the cookie to tell it the language is French).
In the sitemap, the French URL would appear as http://www.your-site.com/lang-fr/exemple/bonjour.html, however, since search engines also crawl the site to look for additional URLs, as soon as they visit a link with /lang-fr/, all of the links on that page will not have /lang-fr in them.
It is not as big of a problem if the product name is the same because Friendly URLs are also the same for all the languages. So when a URL from /lang-fr/ is crawled and links are found on it without /lang-fr/, they would lead to the default English version. Since the URL is the same, it's not as bad.
When you give different names to URLs in each language (using the link rewrite field), they keep leading to pages in the default language (when cookies are not present). This really messes up the way your site is getting indexed by search engines. Multi-language URLs will all lead to the default language page creating duplicate content. More importantly, they are not getting their content indexed properly.
As a solution for this, we came up with a change to keep the /lang-xx/ in the URL all the time (except for the default language). This keeps the proper URL structure and will make sure that each URL gets displayed in it’s proper language.
We have implemented this on our own site and another test site in PS 1.3 (http://www.presto-changeo.com/13/).
*The required modifications are now included in the "Duplicate URL Fix"
Download the modified files from http://www.presto-changeo.com/SEO_Fix.zip (4 in total) for PS 1.2, 1.3 and 1.3.2, make sure you keep a backup of your existing files before copying the 3 modified ones.
This does not affect PS1.1 since it didn’t have the Friendly URL /lang-xx in it.