20

I just got a Windows Server 2008 VPS and I'm having trouble getting IIS7 setup.

I created a new website in IIS with the path, ip address, and hostname (like 'www.nameofsite.com') and click OK. When I browse to the site it pulls up "http://www.nameofsite.com" in the browser and... nothing... IE cannot display this webpage.

If I blank out the hostname in the bindings and click [Browse] it works fine (it takes me to http://10.10.2.92 - the computer's ip). So entering the hostname breaks the website.

Any ideas on what I'm missing? Services I might not have running or roles I'm missing?

No server roles were initially installed on the VPS so I installed IIS, DHCP, DNS, and Application Server... overkill, but I wasn't sure what to install.

  • Does your DNS server know where www.nameofsite.com is? – JP Alioto Jul 30 '09 at 01:36
  • I don't know. Would this be under "Forward Lookup Zones" in DNS? I've basically done nothing else on the server besides add the site in IIS. –  Jul 30 '09 at 01:56

2 Answers2

24

First it has to be in DNS or the client machines hosts file. To test this you can add the hostname to the servers hosts file.

Go to start -> run and type "drivers" change to the etc directory you want to edit the hosts file. The entries in it are like a local DNS. They only work on the local machine!

Gary
  • 1,847
  • 2
  • 14
  • 22
  • 2
    I ended up talking to someone that said exactly the same thing. I set it up in DNS to point to my computer and it worked. I knew that I needed to set it up in DNS for it to work across the internet, but I mistakenly thought if I set the hostname and browsed to it on the same machine (without setting up DNS) it would work (on that machine). Ends up you have to give it some way to resolve the name (even though it is on the same box)... either through the machine's hosts file or DNS. Thanks for your help! –  Jul 31 '09 at 02:01
  • 6
    to be clear ... run windows explorer, go to the folder C:\Windows\System32\drivers\etc, open/edit "hosts" file using notepad (back up the file first, just in case) – carrabino Oct 29 '13 at 15:40
  • 1
    I tried doing this, my website was seen when i go from iis(from the server) Right click websitename>Manage website>Browse. But when open the website from another computer, i can't view the website. How to resolve this? – Juran Jun 01 '16 at 01:48
0

You must use EXTERNAL DNS not Internal DNS to make it visible across the internet. Change the DNS pointer at your registrar or whatever you are using for external DNS propagation.