0

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?

4

1 回答 1

0

你为什么要这么做?在您的情况下-当我将站点称为除此之外的代理或仅是 es 时,我将永远不会看到您的德语网站...

您应该让“用户”有机会选择他们想要使用的语言……然后 google 和 co 应该更接近您的朋友

于 2012-07-23T15:15:05.023 回答