I am working on a multilingual website (php/mysql) and my question is what would be the best solution for language identification - sessions/cookies or URI identification. I mean in terms of SEO, what would be more accurate.

Thanks

Comments

Is this a single domain, or one domain per language?

Written by Jürgen Thelen

Possible duplicate of Any Ideas for Developing a Multi Language Site - SEO, php, mysql

Written by Gumbo

I have a single domain for all languages and their corresponding translations.

Written by Vasil Dakov

Thanks for the link @Gumbo, i will check it now ;)

Written by Vasil Dakov

Accepted Answer

There are different types of projects which shouldn't use the same language implementation.

Let me give some examples:

  1. The first project has an single domain name, let's say example.com. This website, should be available in three languages. In order to let the search engine clearly crawl and index each language - the correct solution here would be passing it by url. example.com/fr/ for french.

  2. The second project, has an domain name for each language, example.fr, example.co.uk. It would be best that each domain is only indexed by the search engine by it's primary language. Therefor, the solution I'd pick would be storing the language in a cookie when switching. (or redirect to the other domain entirely).

If we'd pick the solution of example 1 for example 2, both example.co.uk/fr/ and example.fr would have the same content, which isn't SEO friendly.

This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki