Seeing the HTTP headers for a page

How do I see those HTTP headers for my Web page?

The easiest way is to Telnet to your Web server using port 80. So, you could type telnet www.mywebsite.com:80 from the Start » Run menu in Windows, or use your own favorite telnet client.

Then enter:

GET /somedirectory/somepage.html HTTP/1.1 (Enter)

Host: www.mywebsite.com (then hit Enter twice)

You should get the HTTP headers for that page, followed by the HTML, and then the server will disconnect. It is probably worth saving the session to a log file or having a big buffer, so you can see the headers at the beginning of the file.