Can browse to http://localhost/ but can't by IP nor by organization computer name

7,454

First ensure that either the IP and/or the host is defined against the website you have created. Also check there isn't a binding conflict as a website will not start if it has a conflict.

Also check that DNS is working properly and the host / IP is assigned to that computer by opening a command prompt and running

ipconfig

and then run

Ping -n 1 -w 100 <hostname>

These should return matching IPs. If they don't you need to either assign the IP or if incorrect fix the DNS. If completely missing you can put into the local 'hosts' file

Share:
7,454

Related videos on Youtube

Y.S
Author by

Y.S

Scrum Master

Updated on September 18, 2022

Comments

  • Y.S
    Y.S over 1 year

    I'm using windows server 2012, When opening browser, and placing localhost in the URL, i'm able to navigate to the IIS welcome screen successfully.

    But, if I use the IP or the computer name, I'm getting "Unable to connect".

    What I've tried:

    1. Disabling / Enabling anti virus related services (kasperski).

    2. Disabling / Enabling windows firewall service.

    3. Verified no proxy is in use.

    Would appreciate assistance,

    thanks in advance.

    • zagrimsan
      zagrimsan over 8 years
      Is IIS listening on the IP you tried to use or is IIS only bound to the localhost IP)? On command prompt, try netstat -ano |findstr :80 and see if you find a line containing the IP (or 0.0.0.0 which means every network interface) with the word "LISTENING" in the 4th column.
    • Y.S
      Y.S over 8 years
      I found the line you mentioned, what does it mean exactly? is this causing the issue?
    • Y.S
      Y.S over 8 years
      To clarify, I found the 0.0.0.0 line
    • zagrimsan
      zagrimsan over 8 years
      That means IIS is listening on each IP assigned to the server on the given port. So, that's not an issue here. However, do check the list given in serverfault.com/questions/659301/… (especially do try with telnet) and check that IIS is also configured to serve the sire on the IP you try. Thinking of it now, "unable to connect" could be just your browser hiding the actual reason which might be any HTTP error, so do check also what the actual error is (how to do it depends on the browser).