Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have servers hosted at a hosting provider and they also host the DNS records for my domain names. Now I want to add subdomains that are resolved by my own DNS service. So for example:

  • the hosting provider's name server knows the IP address for
  • one of my servers knows the IP address for


  • unknown or undefined subdomains should be routed to the same IP as the parent domain
  • on failure of my DNS service, it would be great if the requests all go to the IP address that is associated with, but I'm not sure how that should work.

Now, I've read through the Wikipedia articles on DNS to dust off my knowledge, but the part that leaves me confused is: how does a client know which server to ask for the IP address for Does it get that information from the hoster? If so, do I have to register the subdomain there (and what would I need my name server for then)?

share|improve this question

3 Answers 3

up vote 7 down vote accepted

If you want to delegate authority for a section of your domain you are going to need to add another level to the hierarchy.

When a recursive DNS server asks for the address for it is going to go through a number of steps. First it is going to ask one of the root servers which will reply with the name servers for the .com domain (this step will likely be cached and only done infrequently). It will then ask the .com servers and they will respond with the name servers for the domain. Finally it will ask these servers for the address record for

In theory you could simply add as an NS entry in the parent zone


services     NS
ns1          A

And then create as a zone in your name server. But if you do it this way you will have to create a new zone per server. What you probably want to do is ask your provider to add a delegated subdomain.


services     NS
services     NS A A

You can then add as a zone on your name servers and simply add new entries as you need them in this single zone.

If you really need the short names too it shouldn't be too much trouble to get CNAME records added such that has a canonical name of which leaves you able to change the IP address whenever you want to and allows users to use a short name.    CNAME
share|improve this answer
So, is it correct then that an entry of " IN NS" actually means "for the domain and all subdomains, go ask"? I think this is what I may have misunderstood in the first place. –  Hanno Fietz Jun 17 '09 at 11:56
That is correct, although for real world lookups the vast majority of lookup decisions are going to be made based on records in the parent zone (i.e. the .com zone in this case). The NS records at the top level of the domain are actually largely cosmetic and there to maintain consistency (i.e. to make sure that when and are asked for the NS records for they both give the same answer) –  Russell Heilling Jun 17 '09 at 12:33

You need to add a NS entry for pointing to your own DNS server. When a client will want to resolve it wil ask your provider DNS, that will answer that it can be resolved on your own server. an example would be : IN NS IN A YOUR_DNS_SERVER_IP

To have anything befor to work you can use a wildcard record (*)

share|improve this answer

But for something like you may not need to delegate anything. Something like is usually a hostname not a subdomain. If that's the case just add an A record for it. IN A

You can also add A records with dots in them e.g.: IN A

If the DNS is bind you can use wildcards to e.g.:

* IN A

I'm not sure that delegation is really useful unless you actually want to allow some other person or organisation to manage the sub domain.

share|improve this answer

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.