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

Why does navigation to localhost not work on Windows Server 2008 R2? The expected result is the IIS application hosted on the machine in question to be returned. Navigation to localhost/mySite returns a 404 however using machineName/mySite returns the application as expected.

Is there a way to fix this to allow localhost to properly work?

What has already been attempted to no avail, modifying the registry:

setting DWORD: DisableLoopbackCheck 1 at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0

share|improve this question

closed as off-topic by Ward, HBruijn, fuero, Katherine Villyard, masegaloeh May 23 '15 at 22:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Ward, HBruijn, fuero, Katherine Villyard, masegaloeh
If this question can be reworded to fit the rules in the help center, please edit the question.

What do you mean it does not work? t works on my stock installed iwndows servers. – TomTom Dec 1 '11 at 17:16
do you have IE ESC turned on for your account? – Top__Hat Dec 1 '11 at 17:18
@ChrisMarisic If you have a problem, Meta Server Fault is the place to discuss it. Not comments. – MDMarra Dec 1 '11 at 18:42
IE ESC means Enhanced Security Configuration. What's IE SEC? – TristanK Dec 3 '11 at 3:49
Your description of how it doesn't work should ideally include: What you're trying to do; what the response is (you don't have a symptom listed right now); the program you're trying to do it in; what the server program you're using is; what you've tried (which you have in there); and any other relevant information; there's not a lot to go on here. Incidentally, Win2K8+ tends to go IPV6 first, so if there's no binding for ::1 (IPV6 localhost), that can be a problem. You've described authentication-related settings, but haven't demonstrated an authentication-related symptom. More info = better. – TristanK Dec 3 '11 at 3:54

By default, this is not blocked. Chances are you haven't enabled the exception for IIS in Windows Firewall. To test, you can disable the firewall all together. If that works, you should re enable it and then enable just the necessary rules.

Update: Reading your comment, it seems that what I mentioned above isn't the problem. If works in the browser and localhost does not, chances are something (someone?) borked your default HOSTS file. Make sure that localhost is in there. There's nothing magic about the word "localhost". It's just an entry in the default HOSTS file that points to

share|improve this answer
This answer is not relevant to my question, will downvote soon. – Chris Marisic Dec 1 '11 at 17:29
What exactly isn't relevant? It was entirely relevant, given the scant amount of detail in your original question. I then updated it when you commented on your own question with more details. Downvotes should be for wrong or misleading answers. Not for answers that make an attempt to answer a vague/incomplete question. – MDMarra Dec 1 '11 at 17:34
The firewall answer makes no sense, and your edit occurred after my initial comment. – Chris Marisic Dec 1 '11 at 17:37
Machinename/site works, localhost/site doesn't...are you only binding to a particular IP address and not listening to or 127.*? – Bart Silverstrim Dec 1 '11 at 17:39
@ChrisMarisic It makes perfect sense. In your original question you didn't state that you could connect in any way. Logically, most people test using localhost before making DNS entries, so it's safe to assume (since you didn't say otherwise) that you couldn't connect at all. Then, when you commented that you could get there using the hostname, I edited my answer to make sure that your localhost-to-loopback mapping was happening properly, which is a valid suggestion given your problem. You might want to read How to Ask. It outlines why detailed questions are important to getting good answers. – MDMarra Dec 1 '11 at 17:45
up vote 1 down vote accepted

Windows Server 2008 R2 with IIS 7.5 does not appear to add an IIS binding to localhost by default. You need to explicitly add a binding for localhost. For information on adding a binding to IIS see

Choosing to not add the binding you must access the site via machineName/siteName or any other configured binding such as even when local.

share|improve this answer

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