Loren Halvorson's Blog

If your only tool is a hammer...

Tip for using Fiddler on localhost

When I'm troubleshooting HTTP traffic, I reach for the invaluable Fiddler trace utility. It shows me everything going on over HTTP.

However, when you run Fiddler against a localhost URL you probably won't see any traffic, but you can easily fix this by simply adding a dot to the end of localhost in the address.

Intead of http://localhost:1234/MyApp/...,
use http://localhost.:1234/MyApp/... (it's subtle, but notice the extra dot after localhost).

This tip is widely known and documented (there are other workarounds listed at that link), but I just wanted to highlight this simple fix, because I've recently seen some who were not aware of it. It would be very unfortunate for someone to download and try Fiddler only to immediately discount it as "junk" just because of this. It is an awesome tool, and it's not just for IE, it hooks WinINET and is useful for watching other HTTP traffic like web service calls.

Comments

PBZ said:

You can also use your computer's name instead of localhost

# January 10, 2008 1:29 PM

Dmitriy Nagirnyak said:

Thanks. You saved my day.

# January 10, 2008 5:35 PM

Ryan said:

How do you setup Fiddler to run server side?  (Where client is not running local?)  

Is it possible to monitor a WebService this way?

# January 25, 2008 6:34 AM

Ryan said:

Never mind... MSSoapT3 is the one for server side.

Great blog!

# January 25, 2008 7:02 AM

olja said:

Is this supposed to work with Vista & Fiddler 2.1.2. I have tried adding the dot as well as using the computer name via host files without luck. Is there anything else that I can try?

Thanks for the post!

Olja

# March 13, 2008 4:21 PM

lorenh said:

Good question. I currently don't have any Vista machines at my disposal to try.  I've only tried it with Fiddler version 2.1.1.1 (and I just tried 2.1.4.4) on Windows XP, and all is good. Somone out there using Fiddler on Vista will need to comment.

# March 13, 2008 4:42 PM

Johnson Mathew said:

Can anyone explain me what is happening if we put extra dot after localhost?

# October 16, 2008 2:26 AM

wormster said:

Try using http://ipv4.fiddler:1234/MyApp...

Can't remember where I got this from but it works on Vista for Fiddler v2.1.8.2

# November 7, 2008 9:58 AM

Annihil8 said:

wormsters idea works indeed :)

# December 10, 2008 7:24 AM

Josh said:

(For Matthew Johnson):

It has something to do with the trailing dot indicating a FQDN (fully qualified domain name).

# February 2, 2009 1:56 PM

B2B said:

solution with dot will not work when site is using windows auth. the tip with pc name is better

# February 10, 2009 4:32 PM

rmdw said:

A big THANKS to wormster for his suggestion to use this syntax:

 http://ipv4.fiddler:1234/MyApp...

I'm running VS2008 on a 64-bit Vista machine and it's the only that worked to get Fiddler monitoring my app when running locally.

# April 27, 2009 6:08 PM

Nemesis116 said:

Thanks!

# July 20, 2009 4:49 AM

ak said:

very useful tip. thanks.

# August 4, 2009 10:03 PM

Cosmin said:

Very good tip, Wormster. It helped me a lot!

# October 11, 2009 7:46 PM

George Barker said:

Ugh.  Not working for me.  Is anyone using ASP.NET MVC?  I think changing the root is screwing up my routing...

# October 14, 2009 3:59 PM

George Barker said:

Actually routing is working fine.  I think the problem was I had authenticated automatically as the app started up under the "localhost" domain and that didn't carry over to the 127.0.0.1. domain.  If I authenticate at 127.0.0.1. all is well and fiddler works.

# October 14, 2009 4:08 PM

Deepak said:

i wud like to know how can i tace the ip of a person while chating on gmail

# January 8, 2010 12:52 AM

fkerim said:

Very useful blog. Thanks

# January 13, 2010 4:14 AM

Sreenath Urala said:

And i was publishing my asp.net site to IIS to debug the Web Service calls each time i built. And a single '.' would save me so much trouble?

Saved by the '."

Thanks

Sreenath

# January 19, 2010 11:54 AM

Hashmat said:

How to get the traffic when we click something in a pop up window (localhost application) which does not show any url. How to put the dot (.) after localhost.

or what could be the work around for it

Thanks

Hashmat

# February 19, 2010 7:51 AM

TZ said:

I tried this option in Windows 2008 Server x64 but didn't work. Please let me know whether I should do something different for Win2K8 server. THANKS.

# March 23, 2010 9:22 PM