When I type curl www.google.com in the terminal I get the below reply. But when I type the similar url(http://www.google.com) in browser(chrome) I get redirected to http://www.google.co.in
Why am I not able to see the below HTML when I call the same URL from browser?
<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.co.in/">here</A>.
</BODY></HTML>
Browsers automatically follow redirects, so that intermediate page will only be available for a microscopic fraction of time before the
.co.inversion of the page is loaded. CURL, by default, does NOT follow redirects, so you get that intermediate page instead.