Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
183
rated 0 times [  186] [ 3]  / answers: 1 / hits: 36697  / 15 Years ago, sun, january 10, 2010, 12:00:00

title is pretty clear.



My websites consists of both English-written and Spanish-written versions.
You can go to the main site, which is in Spanish, by clicking http://www.chrishonn.com and to the translated version, which is in English, at http://en.chrishonn.com. At the index of each page there is a link (at the bottom) which allow the user to pass from one site to the other.



However, I was wondering, how do big sites like Google, Yahoo!, and other brands' websites to recognize the user's geographical location/IP so that - depending on that - the site's language is adapted (i.e. you are from China and you visit www.google.com, you'll be redirected to www.google.cn).






I have stated on every single page of my website the language:



<meta http-equiv=content-language content=en>


That example is of course from one of the http://en.chrishonn.com sites, which are in English.



I hope someone can give me a hand.
Thank you (if I missed something, please let me know).


More From » html

 Answers
9

As for Google, your location is determined from your IP address. A request to google.com from outside the US returns an HTTP/1.1 302 Found which redirects you to your country specific domain.



As also discussed on another post, doing these kinds of redirects can make SEO tricky and complicated. I suggest reading Matt Cutt's article (a Google software engineer) on how Google handles the 302 Redirect: SEO advice: discussing 302 redirects.



Different search engines handle the 302 redirect in a different way. With 302 redirects, you may risk having your original domain ignored by search engines.






If you want to determine your users' location from their IP address, there are many off-the-shelf services which basically map most of the IP ranges to countries. You may want to check:








Another popular technique is to parse the Accept-Language HTTP header, which contains information about the user's language preferences. Mainstream browsers allow these language preferences to be modified by the user. You may read more about this technique from:







[#97872] Thursday, January 7, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jocelyntrishar

Total Points: 48
Total Questions: 96
Total Answers: 83

Location: South Sudan
Member since Sun, Jul 11, 2021
3 Years ago
;