Windows: Using PuTTY as a Telnet client


There have been a lot of questions regarding using telnet to issue HTTP requests.

For example, here is one thread with many answers regarding the use of Microsoft/Windows telnet:

A lot of people have been having problems with it, or have been unable to install the telnet client on Windows 7.

An alternative is to use PuTTY, a free telnet client:

Here are some instructions to use PuTTY to connect to web servers and send HTTP requests.

Note: These instructions were developed on Windows. Putty is also available for Unix systems, but if you're using Linux, you likely already have a built-in telnet program, or you know what you're doing.


  1. Download and run putty.exe.
  2. Under Connection > Telnet select Passive for Telnet negotiation mode.
  3. Under Window type a large number (e.g. 1000) in Lines of scrollback. This will allow you to see the entire HTTP response if it's too long.
    Alternatively (perhaps preferably), you can set logging options under Session > Logging. Set Session logging to All session output and choose a log file destination (default will be in the same directory that putty.exe is located in). You can then review this log file in Notepad or another text editor to see the full (and formatted) response.
  4. Return to the Session page, and select Telnet for Connection type.
  5. Type in the desired hostname (i.e. in the Host Name field.
  6. Type 80 in the Port field.
  7. Select Never under Close window on exit.
    Important: At this point, you can save these session settings so you won't have to set them up every time! Just type a name in the box under Saved sessions, maybe "Telnet for http" or something, and click Save. In the future, you can just select this session from the list and click Load. Now you just have to set a new hostname and you're good to go!
  8. Click Open.
  9. You should see a blank terminal window. Notice that the window title shows This is good - it means you successfully connected to the web server at that address and it's waiting for your request.
    enter image description here
  10. Type in your HTTP request, with a single line break between each line in the request, like this:
    enter image description here
  11. Press Enter twice, once to move to the next line in your request, and then once more to tell the server your request is complete.
  12. You'll see some text flash by, and then a dialog box indicating the connection was closed, like this:
    enter image description here
  13. You can close the notification dialog, and then scroll back up to the top of your Putty window, to see the HTTP request and response:
    enter image description here


The window closes right away!

Make sure you have Close window on exit set to Never. Otherwise, once the HTTP response is received, Putty feels that the session has closed properly and will close the window.

I get a 400 Bad Request error in my HTTP response

Make sure you have Telnet negotiation mode set to Passive under Connection > Telnet in your configuration.

I get a 404 Not Found error in my HTTP response

Did you forget to include Host: in your HTTP request? For this example, you're connecting to a Google web server that handles many websites - you need to make sure to tell it where to send your request.

asked 20 Apr '12, 14:14

djboge's gravatar image


accept rate: 0%

edited 20 Apr '12, 14:24


you are a golden god.

(24 Sep '12, 02:59)


entontoent's gravatar image

hi i cant give the line break between HTTP/1.0 and Host:www............... when i press enter i get 400 error or when press shift+enter i get that huge markup still saying HTTP/1.0 not found, it does not let me type in Host:, why

(19 Feb '13, 03:28)


anwar-1's gravatar image

OK, I vote for this post as the single most valuable post on Udacity (at least up until now!). I've even used Putty before and ashamed to say I could not get telnet to work right until reading this post. Even then, doesn't work anymore (301 error is probably a lie used for security purposes), but works beautifully. Just remember to type it again in the window (NOT!) and hit return TWICE at the very end. Thanks so much!!

(08 Aug '13, 21:53)

Dell Anderson

Dell%20Anderson's gravatar image

22 Answers:

123next »

How to configure auto login ? as scripting for putty on window to login unix .


answered 26 Dec '13, 05:56

SDE's gravatar image


thanks for the post...itz really very helpfull....was banging my head unil got here....


answered 18 Aug '13, 12:38

hardik-2's gravatar image


it worked for me after several trials, i discover that you must follow the syntax i.e GETspace/spaceHTTP/1.0 i.e GET / HTTP/1.0. Thank you all


answered 07 Aug '13, 05:58

ridwan-1's gravatar image


FINALLY GOT THIS TO WORK! the putty settings made all the diff. however as of today 8/3/13 the url is NOT when i tried to interact with that location 301 code was returned, server permanently moved. when i tried connecting to www. 80 and then used Host: IT WORKED!!!! took me about 3 days to get this. i also sent output to a log file which is tremendously helpful.

GET / HTTP/1.0

HTTP/1.0 200 OK
Accept-Ranges: bytes
Content-Type: text/html; charset=UTF-8
Date: Sat, 03 Aug 2013 17:06:37 GMT
Etag: "780602-4f6-4db31b2978ec0"
Last-Modified: Thu, 25 Apr 2013 16:13:23 GMT
Server: ECS (ftw/FBA9)
X-Cache: HIT
Content-Length: 1270
Connection: close

<html> <head> <title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {
    background-color: #f0f0f2;
    margin: 0;
    padding: 0;
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

div {
    width: 600px;
    margin: 5em auto;
    padding: 50px;
    background-color: #fff;
    border-radius: 1em;
a:link, a:visited {
    color: #38488f;
    text-decoration: none;
@media (max-width: 700px) {
    body {
        background-color: #fff;
    div {
        width: auto;
        margin: 0 auto;
        border-radius: 0;
        padding: 1em;



Example Domain

This domain is established to be used for illustrative examples in documents. You may use this
domain in examples without prior coordination or asking for permission.

More information...



answered 03 Aug '13, 13:15

Deborah-32's gravatar image


Thank you. Now I can shower and shave and try to get my wife back.


answered 22 May '13, 09:33

Charles-138's gravatar image



anyone else get a 301 moved permanently?


answered 03 Feb '13, 15:58

Will-49's gravatar image


yes, and the output is of just a few lines !

(20 Feb '13, 06:03)

Nikunj Banka

Nikunj%20Banka's gravatar image

Has moved to How do we connect to this site? This seems to be the source of the 301 error

(28 Feb '13, 00:59)

Ken Oh

Ken%20Oh's gravatar image

Thanks so much. It works!!!! This is an excellent post :-)


answered 20 Mar '13, 09:07

Yuki-2's gravatar image


Hi when i type this line GET /HTTP/1.0 and press enter or sift+enter, it just immediately closes the connection and i get the 400 error, if instead press control+enter after typing the first line, i get the <!DOCTYPE HTML> and a long screen of text that at the end reads The requested URL HTTP/1.0 was not found, i have tried with HTTP/1.1 and i get the same it never lets me type in the second line Host: whenever i try to put a line break, this is freaking me out.........why is it not letting me type this second line Host: after the line break


answered 19 Feb '13, 02:41

anwar-1's gravatar image


you are my hero... using telnet in windows gave me a headache last week.


answered 05 Jan '13, 09:36

ganeshan%20dash's gravatar image

ganeshan dash

Thanks! This method worked for me too. :)


answered 18 Nov '12, 13:16

Fiona%20Currie's gravatar image

Fiona Currie

Your answer
Question text:

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 20 Apr '12, 14:14

Seen: 62,773 times

Last updated: 26 Dec '13, 05:56