6

I am setting a Magento multilanguage website with subfolder as suggested by many SEO and Google guideline.

For example:

example.com/it (Italian default)
example.com/en (English)
example.com/fr (French)
example.com/de (German)
example.com     (what to do with this?)

Magento makes it easy using "Add Store Code to URLs" showing correct language for each subfolder.

I read many threads about language subfolders but none of them is suggesting what to to with the root domain example.com.

My default language is /it, I may be wrong but it seems that Magento keeps default language content both on example.com and example.com/it.

So what is best practice for when a user get to example.com?

2
  • Is example.com exactly the same as example.com/it? And do links from example.com point to example.com/itand its sub folders?
    – Seb
    Commented Jul 28, 2015 at 14:49
  • Yes this is the standard way Magento handle subfolders when configuring with the setting "Add store code to urls". Example.com has exactly the same as example.com/it and links from example.com point to example.com/it and its sub folders. Commented Aug 3, 2015 at 15:27

2 Answers 2

1

You have several possibilities:

Choose one language

Choose one language and redirect. If you have a "main" language then this might be the best option.

Automatically detect the language

Use the Accept-Language header that the browser sends and automatically redirect appropriately. Google does this for international visitors.

Using .htaccess and mod_rewrite you could use code like this to make it happen:

RewriteEngine on
RewriteCond %{HTTP:Accept-Language} (de) [NC]
RewriteRule index.html http://example.com/de/ [R,L]

Offer users a choice

Ikea uses this solution:

So does Wikipedia.

2
  • Well I like the option: "Use the Accept-Language header that the browser sends and automatically redirect appropriately. Google does this for international visitors". Do you also have any tip how to set this option with htaccess? Commented Aug 3, 2015 at 15:29
  • I've added .htaccess code for that case Commented Aug 3, 2015 at 15:33
0

If your default language is /it, then make example.com/it as your default home page with italic content. Show appropriate version of content for your users. Regrading example.com English content will be best practice for users

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.