I'm new in microsoft server administration, please forgive me in advance

I have a Hyper-V Windows Server 2012 instance with IIS enabled.

I create a website on it with a custom name and a Application under it

everything works great when I access the website in the VM or from my Windows 10 Host PC

What I can't understand is, why is it only accessible by IP "http://ip/myapplication" ? why am I not able to access it by the VM hostname?

After searching on web I came across that I need a DNS server.

I confess that the concept of DNS is hard to understand for me (sorry) but even harder to get is: why the hell do I need a whole new server address this issue?

please help, be nice with a beginner

  • Side note, It's also best practice to segment certain roles, for instance, a Hyper-V server is recommended to only run the Hyper-V role, and should not have IIS loaded on it. You may need to create a virtual machine to host IIS as well as create a domain controller with an AD integrated DNS environment. see best practices article here – Brett Larson Jul 26 '16 at 3:32

DNS is a distributed lookup database dedicated to a name hierarchy we know as domain names. The top level is the root. It has no name, so a lone dot is used. At that level is com and net. These make for the next level which has millions of names and is where yours would be. You need to get your name put there. This process is a shared system (details we do not need to learn) called domain registration. You need to visit one of the hundreds of domain registration agents and register your name.


Although a local DNS server will solve your problem, there's a simpler way: edit your hosts file. You can do this manually with any text editor, or you can use a tool such as Hostman to do it for you (don't forget to run it as administrator).

Your hosts file keeps track of hostname IP address pairs connected to your system. Having a local DNS server does this automatically for you, but yes, it's much more complicated to set-up and maintain (although it's relatively straightforward with Windows Server). DNS registration is only necessary if you want your machines to be accessible by hostname or domain name over the Internet. You can still, however, access a single machine by domain name on your local network from the Internet without running a local DNS server (by using port-forwarding, domain registration still required).

Here's a great tutorial that explains how to edit your hosts file in more detail.


Your computer is most likely set to use a DNS server of your router / modem and that most likely points to a public ISP such as Comcast, or Google,, when you try to resolve http://hostname/myapplication with your web browser your DNS client is performing a lookup because it does not know about that hostname. (although you can probably resolve the IP using ARP)

You can manually edit your host file as specified, or setup a DNS server to resolve that primary zone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.