We use hostnames such as port135.com or microsoft.com to access websites. If not specifically blocked, they can be accessed via IP addresses as well. However, there might be a time that your website is not accessible via hostname. It serves only through the IP address. In this post, we will figure out how to fix this issue.
If you configure IIS binding as “IP address: All Unassigned – Port: 8080”, it should be listening the port 0.0.0.0:8080. If it listens 127.0.0.1:8080 which is the localhost, then your website will not be accessible via hostname.
Curios about how HTTP redirection works in IIS? Check this post out.
Solution for the issue (Website is not accessible via hostname)
Follow the steps below to solve this issue.
- Check the “listening” ports
netstat -ain Command Prompt. Also run
netsh http show iplisten. In the output of both commands, you shouldn’t see 127.0.0.1:8080 as a LISTENING address. The screenshot below shows the ideal situation.
- Remove 127.0.0.1
If you see the IP address 127.0.0.1 in the output, you will need to remove it to solve this issue. Simply run this command:
netsh http delete iplisten ipaddress=127.0.0.1
You may need to add the IP address 0.0.0.0 manually if it doesn’t already exist as a LISTENING port (Source).