Zhenya Zhenya - 1 year ago 76
HTML Question

Multilanguage page with all indexes pages in folders and 302 redirect from main index

I have a multilanguage website:

when it is requested index page checks the browser language for new users or cookies for returned users and redirect them, for example:
Header ("Location: /en/");

I found this:

Problems found: You use a 302 redirect. This means, that the actually
content is temporary not reachable and will come back soon. To use a
302 redirection for generally moved pages is a bad idea.

So I don't know what to do, I checked a lot of websites and I found some like mine and a lot which has english index in the root and all other files in the folders.

Should I move /en/index to /index? If yes is there an easy htaccess rule to do that leaving the file in the folder?

Or should I improve the redirect in some way?

Answer Source

You could go with a splash page like UPS.com, and then redirect with javascript (based on a php-built trigger if you need to use the server side detection).

That would avoid your 302 and leave search engine fodder for bots to follow (because you would have the links on that splash page).

Edit after checking your site

enter image description here

You are currently sending a 301 right now, which will be wrong for search engines since they will expect that your site has permanently moved to /en/ which is not true...you just want to redirect them based on language, which imho is a valid reason to issue a 302.


you may want to google 302 and seo as keywords and then restate your question. for my purposes your site looks great in google (google.com/…) so, i wouldn't risk messing it up by changing the redirect. you just might really mess things up. performance wise, you're fine with the 302. semantically, the 301 is wrong - but that's my opinion and the 301 302 battle is probably no where near complete, so i respect whatever works. 302 is working for you, according to your google results

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download