Testing access to a website using PuTTY

Hide.me VPN
You can use a telnet program to send the commands to a website that a browser would send to test access to a site. If you are using a Microsoft Windows system that no longer provides a telnet program by default, you can use the free PuTTY program for that purpose. To do so, you can create a new session and select "Raw" for the connection type. Put 80 in the port field and the fully qualified domain name (FQDN) of the wesite or its IP address in the "Host Name (or IP Address") field.

PuTTY HTTP configuration

You can put a name for the session, e.g., "HTTP Testing", in the "Saved Sessions" field, if you want to save the configuration for continued testing.

Click on Connection under Category and set the keepalive option to a few seconds, e.g., 5, to lessen the chance of the connection being dropped.

PuTTY keepalives

Under Session click on Logging then select "Printable Output" for Session logging and specify a location and file name for the log file under "Log file name".

Learn on Udemy Today!

PuTTY logging

Click on Sesion again under Category and, if you've given the session a name, click on the Save button to save the configuration for the session so you can open a session with the same configuration in the future without having to reset all of the options.

To connect to the web server, click on the Open button; if you've saved the session and don't have it loaded, select it and click on the Load buton first.. When the window opens for the connection, you can type GET / HTTP/1.1 and hit Enter and then type Host: example.com, or whatever the name is for the website, e.g., www.microsoft.com, etc.

PuTTY HTTP commands

Then hit enter a couple of times. If you use example.com for testing, that is a site specifically created for illustrative purposes, so you will see the following:

Malwarebytes Anti-Malware Premium

PuTTY example.com output

You can also see what your entered and the site's response in the PuTTY log file.

If the log file already exists when you connect to the site, you will see a warning window open telling your the session log file already exists. You will be asked if you wish to overwrite it, append to the end of it, or disable logging for the session.

PuTTY log exists

When you enter GET / HTTP/1.1 you are telling the web server that you want to fetch the root page from the website with GET /. To fetch a specific webpage you could use something like GET /trees/oak.html. "Get" is the request method you are specifying and what follows is the relative location for the page that you wish to view. Then you put a space and specify the version of the HTTP protocol you wish to use, i.e. "HTTP/1.1".

The host line that you enter is an HTTP header field. You follow host with a colon and a space then the name of the website, e.g. example.com. A web server might handle multiple websites, which is why the host header is needed. In the prior version of the protocol HTTP 1.0, that header wasn't necessary, but it is mandatory with HTTP/1.1.

 

TechRabbit ad 300x250 newegg.com

Justdeals Daily Electronics Deals1x1 px

Valid HTML 4.01 Transitional

Created: Sunday July 5, 2015