Reputation: 20046
I have a site created by Ruby on Rails. Before I implement HTTP_ACCEPT_LANGUAGE to detect the client's computer language and set the site's language with i18n, the site can be found on Google.
After I use HTTP_ACCEPT_LANGUAGE and i18n, Google stop crawling my site. And worst, some countries receives Read Time Out Error when going to my site.
What is the problem? (using GeoIP is not preferably, detecting the client's computer language is more meaningful)
Upvotes: 2
Views: 405
Reputation: 9604
As @picardo has said, Google bot crawles the web without sending the HTTP_ACCEPT_LANGUAGE
header. I've implemented a Rails gem to automatically set the I18n.locale
based on this header, but then fall back to guessing based on the domain name suffix, so that it still detects correct language for Google bot. The gem is called locale_detector.
Upvotes: 2
Reputation: 24886
Apparently HTTP_ACCEPT_LANGUAGE is not available to Google bot. See this article for reference.
Upvotes: 3