Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I have an AWS web server - call it It's running IIS and if I visit in a web browser (from any machine, including, it responds correctly with our site. However, if I visit localhost/ or when I'm logged into, I get a "couldn't connect to host" message.

The hosts file has only one entry - the standard " localhost" line. Pinging works fine. Pinging localhost correctly resolves to and works fine.

I've tried restarting IIS and restarting the DNS Cache. I had this problem once before, and restarting the server fixed it, but I'd like to know what's going on in case this happens again in the future.

share|improve this question
A couple updates. The site also stopped responding to locally. Restarted and now everything works again. – Jordan Jun 27 '11 at 16:10

What's the IIS site's binding config look like? What this sounds like is that it's configured to listen on a specific IP (or all IPs with a specific host header), to the exclusion of localhost.

share|improve this answer
Not really sure how to format this, but... (dash means the column is empty) (Type,Host Name,Port,IP,Binding Info) [http,-,80,,-],[https,-,8443,,-],[net.tcp,-,-,-,808:*],[net.pipe,-,-,-,*],[net‌​.msmq,-,-,-,localhost],[msmq.formatname,-,-,-,localhost] For what it's worth, this is the same as the config on another one of our machines that doesn't have this problem – Jordan Jun 27 '11 at 15:56
Don't place it in a comment to an answer. It's information that is part of the question. Edit it into your question. Then you'll be able to format it. – JdeBP Jun 28 '11 at 14:33

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.