Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 and 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 to All is well that works.

The problem is I set it's DNS on the registrar to point to and in IIS give it, it's own website and configure bindings with host name of and 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.

share|improve this question

Does your "" DNS server have a forward lookup zone configured for the ""? 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.

share|improve this answer
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 and; 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, at least one of the glue records (name servers with IP specified at the registrar) should also be 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 and, 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; 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).

share|improve this answer
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 as the name server for; then as the name server for 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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