Search This Blog

Wednesday, June 23, 2010

How to check a website from the commandline

Sometimes it's useful to check a website connectivity using only command line. I.e. when trying a website from remote host, or when you set up a new box you are going to put behind a loadbalancer.

If you need HTTP connection, telnet will be enough:

> telnet 80

GET /index.html HTTP/1.1

In the case of HTTPS you need openssl:

> openssl s_client  -connect -prexit

GET /index.html HTTP/1.1

This is entry for my extend my 'external memory', but you might find it useful.
Post a Comment