telnet 80

Sometimes it’s useful to connect directly to a webserver, forgoing the use of a web browser. It’s good for diagnostics stuff.

The obvious part is running “telnet [hostname] 80″. But from there?

The correct way is to use HTTP/1.1 and specify a HOST. This way it’s compatible with virtual hosts, which have been in vogue for like a decade. Most advice still has you using HTTP/1.0. That’s not always a good solution.

So here’s what you should type:

GET /n1zyy/index.php HTTP/1.1 [enter]
HOST: blogs.n1zyy.com [enter]

If you use HTTP/1.1 and don’t specify a HOST, you’ll get errors. And if you use HTTP/1.0, you’re not able to specify a HOST. (And for the unreasonably literal: [enter] means “Press enter,” not “type ‘enter’ inside square brackets.”)

Comment Form

On Other Sites

  • bob: THANKS! I had no idea this was a thing. Saved my day. [...]
  • Droned: We had the same problem but we were not able to change the server config. We found a nice tool ( htt [...]
  • Matt: I was looking for that exact comic, but didn't get around to actually linking to it. Great minds rea [...]
  • Tomas Sedovic: http://xkcd.com/214/ With that out of the way, wow. The plasma garbage disposal idea is brilliant [...]
  • Chris: This post was exactly the solution to the error I was getting, thanks. [...]