RSS feed logo RSS Feed | About Pantz.org
Check http with telnet
Posted on 07-24-2001 20:13:00 EST | Updated on 07-24-2001 20:13:00 EST
Section: /software/http/ | Permanent Link

This is how to connect to a HTTP server using telnet. All commands are in bold. The [ENTER] below means press the enter key. Note that the enter key always needs to be hit twice after your done typing the last command. The [ENTER] below means hit the enter key.

Connect to the default website.

telnet example.org 80

You should recieve a reply to the effect of:

Trying 192.168.0.1...
Connected to example.org.
Escape character is '^]'.

Now we can send the get command to retrieve a page. Hit the enter key ([ENTER]) twice after the command.

GET / HTTP/1.0
[ENTER]
[ENTER]

Connect to a website that uses virtual hosts.

telnet example.org 80

You should recieve a reply to the effect of:

Trying 192.168.0.1...
Connected to example.org.
Escape character is '^]'.

Now we can send the get and host commands to retrieve a page. Hit the enter key ([ENTER]) twice after the host command.

GET / HTTP/1.1
[ENTER]
Host: www.example.org
[ENTER]
[ENTER]

Connect to a webserver and just get header info.

telnet example.org 80

You should recieve a reply to the effect of:

Trying 192.168.0.1...
Connected to example.org.
Escape character is '^]'.

Now we can send the head command to retrieve a page. Hit the enter key ([ENTER]) twice after the command.

HEAD / HTTP/1.0
[ENTER]
[ENTER]

Del.icio.us! | Digg Me! | Reddit!

Related stories