Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The other day I posted this question

I was doing some local development testing on my laptop and I was getting some general weirdness (As indicated in the hyperlinked question). Now the problem seems bigger. I've gone so far as to turn off IIS locally. Still when I type 'localhost' I get sent to However, while IIS was still running, if I typed 'localhost/default.asp' that did work. I've tried pinging localhost, which seems fine. I've tried tracert. The only thing I know that I did locally that could be the problem is added dns suffixes to my connection. Other than that I can't understand how this is happening.

The logs for my local IIS don't even get hit when it is running and I type 'localhost'.

my host file C:\Windows\System32\drivers\etc

The mod date of the file is 6/10/2009 and I would never have modified it. It appears normal to me.

# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
#          # source server
#              # x client host

# localhost name resolution is handled within DNS itself.
#       localhost
#   ::1             localhost

Update View from nslookup localhost

enter image description here

Update #2

I've isolated the issue down to IE8. Chrome and Firefox do resolve localhost to my local machine. I've tried resetting all settings in IE8, that did not help. I even connected to another wireless network and tried.

share|improve this question
What does your hosts file look like? – EEAA Sep 27 '11 at 12:40
@ErikA, It looks normal. Seem my updated question. – MVCylon Sep 27 '11 at 12:44
What's the output of nslookup localhost? – jscott Sep 27 '11 at 12:46
From your last edit you see that you have a DNS problem. Your DNS server should never time out. – mailq Sep 27 '11 at 13:38

Did you try uncommenting the IPv4 localhost entry in your host file?

#       localhost

Some of the answers here offer more detail as to why this happens on Vista and later operating systems, but as I understand it, the root cause has to do with the way MS decided to implement DNS resolution, particularly IPv6:


Windows 7: "localhost name resolution is handled within DNS itself". Why?

Windows will try the lookup in the host file first and then try the name server if an appropriate entry is not found.

So since there is no entry for localhost in the host file, it is up to the name server to resolve localhost.

One possibility is that the name server resolves localhost as itself instead of your machine and gives the appearance of a redirect.

share|improve this answer
I could try that. Why would my machine need this now? Why did it stop working without any changes? – MVCylon Sep 27 '11 at 14:45
I did this. It did not make a difference – MVCylon Sep 27 '11 at 14:56
Do you get the same result when browsing – Somantra Sep 27 '11 at 15:21
No, I get the page to pull up. I ultimately could work around this, and use the IP, but I want to know what could have possibly changed in the middle of the day last week to break this. – MVCylon Sep 27 '11 at 15:52
That is hard to say Doug, but as a sidenote, I have seen enterprise software bypass this issue by just using You definitely aren't the only one experiencing this issue. I still feel that this is an Windows7/IPv6-related issue. Are you even using IPv6 on your network? Disabling IPv6 and/or flushing dns may help. – Somantra Sep 27 '11 at 15:58

Type at the commandline ping localhost and if it does not return or not ::1 you have a problem.

nslookup localhost may or may not give you "Non-existent domain".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.