Home » IIS » Website is not accessible via hostname (Solved)

Website is not accessible via hostname (Solved)

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.

Background

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.

  1. Check the “listening” ports
    Run netstat -a in 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.
  2. 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
Website is not accessible via hostname
Ideal output

You may need to add the IP address 0.0.0.0 manually if it doesn’t already exist as a LISTENING port (Source).

Ned Sahin

Blogger for 20 years. Former Microsoft Engineer. Author of six books. I love creating helpful content and sharing with the world. Reach me out for any questions or feedback.
Categories IIS

Leave a Comment