I just obtained a Windows Server 2008 VPS. Rightly or wrongly I followed instructions from the host to set up custom name servers. So now I have ns1.mydomain.com and ns2.mydomain.com. The are both the same since I have 1 IP address. I have A records for www, * and a few others, no MX since I use Google Apps. I pointed my registrar that has mydomain.com to ns1.mydomain.com. All is well that works.

The problem is myOtherDomain.com. I set it's DNS on the registrar to point to ns1.mydomain.com and in IIS give it, it's own website and configure bindings with host name of myOtherDomain.com and www.myOtherDomain.com. I thought that was all I'd have to do. Apparently not. Do I have to add something else to the DNS Server? Should I have another custom name server? Since they are pointing to the same IP I figured IIS would untangle things with the host headers.

The site is php, not sure that is the problem though.

  • 143
  • 1
  • 6

2 Answers2


Does your "ns1.myDomain.com" DNS server have a forward lookup zone configured for the "myOtherDomain.com"? Does that zone have the right records in it to resolve the "naked" domain name and the "www" hostname to the IP address of your web server computer?

IIS can handle the host headers fine, but all of the names associated with sites hosted by the machine will need to resolve to the IP address of the web server computer, too.

Evan Anderson
  • 141,881
  • 20
  • 196
  • 331
  • 1st Q: No didn't think I needed too, everything is on one server. 2nd Q: No the 2nd domain has no entries in my DNS server. I was not sure if I had to. All the domains do resolve to the same IP, well supposedly. I pointed my NS under the registrar's DNS settings. – nportelli Jan 19 '12 at 19:20

First, if you only have one server you should only have one glue record. Do not create ns1 and ns2 that both point to the same IP. This causes headaches when your server is offline and gains you nothing.

If your registrar insists on you having two name servers get a free backup DNS service. I use afraid.org and buddyns.com; there are others around too. They're simple and free...

Also, at least one of your glue records for each domain should match the tld of the domain. So if you have example.org, at least one of the glue records (name servers with IP specified at the registrar) should also be ns1.whatever.org. You can have multiple, but at least one should match like this.

Make sure your DNS server (the one on your VM) is configured to server all your domains. If you have example.com and example.org, you'll need to configure both on the server. Be sure that each domain is setup with the relevant default record and any host records you want (like 'www' or 'ftp'). Make sure the SOA and NS records are configured correctly (SOA should be your VM ns1.example.com; the NS records should be your VM and whatever backup DNS services you have configured, they'll come with more directions for setting up these records, it's just as easy as entering their server's names though).

In IIS make sure you either have

  • NO Host Headers configured (if you want all domains pointing to that server to get the same website)


  • You have a Host Header configured for each domain name:

    You can put all the Host Headers on the same IIS site (so they all get the same website);
    You can put each Host Header on different IIS sites (so they all get different websites).

Chris S
  • 77,945
  • 11
  • 124
  • 216
  • Hmm same TLD huh? The one I have setup is .ws, other is .com so maybe that. – nportelli Jan 19 '12 at 14:57
  • Yep, you *should* have something like ns1.example.com as the name server for example.com; then ns1.example.ws as the name server for example.ws. If you want more than one name server just pickup a free backup DNS and add that (they'll have their glue records setup already, you just need to add them to your list of name servers at your registrar). – Chris S Jan 19 '12 at 15:01
  • OK beginning to realize it is probably pretty dumb to have IIS and DNS on same VPS. Especially when I realize at my registrar I can just point to the ip. But I'm stubborn and want to know how this works. So when you say make sure my DNS is configured to serve all my domains, does that mean adding an A record to my zone, or creating a new zone and linking the 2? Slowly starting to understand...maybe. – nportelli Jan 20 '12 at 13:56
  • It sounds like you're confusing a registrar with a DNS host. Registrars are *only* for buying a domain, they *do not* host DNS. However, the same company can also provide DNS hosting services, and most do, but those are two distinct offerings technically speaking. If you are hosting DNS on your VM (which it is not dumb or uncommon to have DNS and HTTPd on the same server) it needs to be configured for all of the domains it will be serving, otherwise when people try to lookup that domain it will get to the DNS server, and the server will tell them it knows nothing about that domain. – Chris S Jan 20 '12 at 14:10
  • So when you pointed the NS records at your registrar to an IP (which should have made you create glue records) it's not pointing web traffic that that IP. That's what the A records on your DNS server are for. – Chris S Jan 20 '12 at 14:12
  • You can't link two zones together, not in the way you're probably thinking at least. If you have two domains, you'll need to create a zone in your DNS server for each. Whether you want to put A records in both is up to you, but if you want people to be able to use that domain to get to a website you'll have to add A records (or CNAME records, they work like A but are aliases for other DNS names instead; so you could setup a CNAME that does asdf.example.com->qwerty.example.com). – Chris S Jan 20 '12 at 14:14
  • Yes I was getting them confused since my registrar does provide DNS hosting. So add a new zone, not just right click on current zone and select add domain. All these words have too many different meanings in different contexts. I understand CNAME records, well at least that I add them to do subdomains and what not, lol. Thank you. – nportelli Jan 20 '12 at 16:05