Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are two things to note here. First - using "<a href="http://google.com" rel="nofollow">http://google.com</a>" in the above URL without the "www" forces a 301 redirect to "<a href="http://www.google.com" rel="nofollow">http://www.google.com</a>" so you should include the www to keep things simple.</p> <p>The second is that opening the URL (with the www) performs a 302 redirect. The destination is inside the response headers. So if you can catch that 302 response, you can get the URL Google will send you to, before it sends you there.</p> <p>Here are the response and request headers for the first request, in which Google performs a 301 redirect to the www domain.</p> <p><strong>Response Headers</strong><br> Cache-Control public, max-age=2592000<br> Content-Length 244<br> Content-Type text/html; charset=UTF-8<br> Date Mon, 18 Feb 2013 14:14:40 GMT<br> Expires Wed, 20 Mar 2013 14:14:40 GMT<br> Location <a href="http://www.google.com/search?btnI=1&amp;q=html5" rel="nofollow">http://www.google.com/search?btnI=1&amp;q=html5</a><br> Server gws<br> X-Frame-Options SAMEORIGIN<br> X-XSS-Protection 1; mode=block<br></p> <p><strong>Request Headers</strong><br> Accept text/html,application/xhtml+xml,application/xml;q=0.9,<em>/</em>;q=0.8<br> Accept-Encoding gzip, deflate<br> Accept-Language en-US,en;q=0.5<br> Connection keep-alive<br> Cookie PREF=ID=5d01155d00a8d706:U=49fab5927df1f8ad:FF=0:TM=1359732743:LM=1360874099:S=byw-1-fgfbcRWdPN; NID=67=NpFNjRkjTFtyrcYPE-pQeJiMFEgWMWdyVMVpbYATZySlsw63Hz4FCw2Tcr4tynhAhyq1vnuPqmdFBOC65Nd-048ZxrgP_HVtKbVCe7psi-G2aMvsOUbiBl1xYks2xK2K<br> DNT 1<br> Host google.com<br> User-Agent Mozilla/5.0 (Windows NT 6.2; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0<br></p> <p>And the response/request headers for the 302 that takes me to the destination page. You can see the destination URL is returned. I've bolded it in the copy.</p> <p><strong>Response Headers</strong><br> Cache-Control private<br> Content-Length 231<br> Content-Type text/html; charset=UTF-8<br> Date Mon, 18 Feb 2013 14:14:41 GMT<br> Location <strong><a href="http://en.wikipedia.org/wiki/HTML5" rel="nofollow">http://en.wikipedia.org/wiki/HTML5</a></strong><br> Server gws<br> X-Frame-Options SAMEORIGIN<br> X-XSS-Protection 1; mode=block<br></p> <p><strong>Request Headers</strong><br> Accept text/html,application/xhtml+xml,application/xml;q=0.9,<em>/</em>;q=0.8<br> Accept-Encoding gzip, deflate<br> Accept-Language en-US,en;q=0.5<br> Connection keep-alive<br> Cookie PREF=ID=5d01155d00a8d706:U=49fab5927df1f8ad:FF=0:TM=1359732743:LM=1360874099:S=byw-1-fgfbcRWdPN; NID=67=NpFNjRkjTFtyrcYPE-pQeJiMFEgWMWdyVMVpbYATZySlsw63Hz4FCw2Tcr4tynhAhyq1vnuPqmdFBOC65Nd-048ZxrgP_HVtKbVCe7psi-G2aMvsOUbiBl1xYks2xK2K<br> DNT 1<br> Host www.google.com<br> User-Agent Mozilla/5.0 (Windows NT 6.2; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0<br></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload