IIS Website not listening on 0.0.0.0 and only 127.0.0.1?

You have configured IIS to be like the image shown below but it only binds to 127.0.0.1 regardless of what you change in the GUI, well the first clue is to check settings use CLI as the GUI can sometimes get it wrong, or some of the settings that globally apply are missing in the GUI - this is one of those.


But when you run this command:

netstat -ano  | find /i "Listen"

You notice that you only see this:

TCP    127.0.0.1:1528         0.0.0.0:0              LISTENING       0

NOTE : 0.0.0.0 is all the interfaces on the server, whereas 127.0.0.1 is only the locahost address, meaning with it only listening on 127.0.0.1 you cannot communicate with the server outside itself, if you have IPv6 enabled the same here is ::1


And you are are wonder why is this, its should be set to "all IP's" not only localhost, well to fix this you can run this command:

netsh http show iplisten

If you are getting this issue you will most likely see this and only this:

IP addresses present in the IP listen list:

-------------------------------------------
127.0.0.1

As IIS uses the http.sys to function and that command "queries and configures HTTP.sys settings and parameters" in the case the latter, now there are some use cases for the server to only listen on 127.0.0.1 and ignore other bindings.

However if other servers need to talk to the server then this setting will prevent that.

To fix this run this:

netsh http delete iplisten ipaddress=127.0.0.1
netsh http add iplisten ipaddress=0.0.0.0
iisreset /noforce