Question

I've used curl to request www.google.com this way:

curl -v --url "http://www.google.com"

I found the result is HTTP/1.1 302 Moved Temporarily to Location: http://www.google.com.eg/.

Although when I examine the HTTP request headers, I can not find any thing that can tell about me, e.g. accept-lang.

Here's the output of the above `curl` command:
* About to connect() to www.google.com port 80 (#0)
*   Trying 173.194.40.49...
* connected
* Connected to www.google.com (173.194.40.49) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.27.0
> Host: www.google.com
> Accept: */*
> 
* additional stuff not fine transfer.c:1037: 0 0
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 302 Moved Temporarily
< Content-Length: 216      
< Location: http://www.google.com.eg/
< Cache-Control: private
< Content-Type: text/html; charset=UTF-8
< P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
< Date: Fri, 29 Mar 2013 18:44:02 GMT
< Server: gws
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
< Set-Cookie: PREF=ID=9d542bb0ba74e1b0:FF=0:TM=1364582642:LM=1364582642:S=QNWV6IaUY-Uw1oUy; expires=Sun, 29-Mar-2015 18:44:02 GMT; path=/; domain=.google.com
< Set-Cookie: NID=67=jOeZdv6A3qHXveaYvn-nG0OKh1cHmwVO8VvA8U-Xv0VBA5nbMtMFcD6d94OS67GJ7ky3hoULCj9qJ97o2HwvRYigj1qGyFBWGRdSRFmi9LLEVKN03IglQrN25BQxTDPx; expires=Sat, 28-Sep-2013 18:44:02 GMT; path=/; domain=.google.com; HttpOnly
< Connection: keep-alive
< 
* Connection #0 to host www.google.com left intact
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"><TITLE>302 Moved</TITLE></HEAD><BODY><H1>302 Moved</H1>The document has moved <A HREF="http://www.google.com.eg/">here</A>. </BODY></HTML>* Closing connection #0
Was it helpful?

Solution

They are probably doing geolocation, based on the IP address of incoming requests, in order to redirect you to a country-specific page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top