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.”)

Leave a Reply

Your email address will not be published. Required fields are marked *