dav
dav

Reputation: 9267

cakephp multilanguage website seo

In here http://book.cakephp.org/2.0/en/core-libraries/internationalization-and-localization.html#localization-in-cakephp it is written

It’s a good idea to serve up public content available in multiple languages from a unique URL - this makes it easy for users (and search engines) to find what they’re looking for in the language they are expecting.

Suppose I have a website created in that way, in English and Russian. The default language is English, so when I open example.com, it is in English. And if I click on Russian link, the page is being reloaded (the session variable Config.language is being set to rus) and the same page example.com becomes Russian. So, suppose, SE crawls my website and has the same page example.com with content in 2 different languages.

Question 1

Does not this sound bed in terms of SEO, and do SEs have some penalties for these kind of things - the same url with multiple contents available ?

Now I search something in Russian and google shows me example.com with the Russian title and meta description (or some text from the page)- so I click on that link, but because session is not set to Russian I will see English content.

Question 2

Is not it a bed practice after all, because it will be tricky for the users, as they click on something and see something else?

Thanks

Upvotes: 0

Views: 190

Answers (1)

Dave
Dave

Reputation: 29141

Yes, it's bad practice to have the same URL load different content.

The common practice that I've seen is to use a language prefix. For example:

example.com/eng/articles/article123
example.com/rus/articles/article123

or

example.com/en/articles/article123
example.com/ru/articles/article123

Then, in your AppController, you can detect the prefix (after setting up in your routes), and set which language you'd like to use based on that prefix.

You can use different slugs as well, but from what I've read, most sites that are English default use English slugs for both - especially if the other languages use characters that aren't URL-friendly.

Edit:

Per James' point below, using a subdomain would be fine too.

Upvotes: 1

Related Questions