I'm working on a website that deals with many languages and when a user enters to example.com
, a little PHP script detects the user browser's preferred language (based on the Accept-Language header
) and based on that it redirects using header(Location: ...)
to en.example.com
, it.example.com
, es.example.com
, etc.
Now, this works perfectly but I found that search engines fail at indexing the homepage properly. I don't know much about the HTTP protocol but I realize I'm doing something wrong here. Does anyone have a suggestion on how to fix this?
Why did you do this? In your case - i will never see your Website in german when i call the site form a agent that execepts it or es only ...
You should give 'users' the posibillity to choose whiche language they want to have ... and then google and co should be nearer your friend