Subscribe via Email

Subscribe via RSS


Creative Commons Attribution 4.0 International License
© Rakhesh Sasidharan

DNS zone and domain

Once upon a time I used to play with DNS zones & domains for breakfast, but it’s been a while and I find myself to be a bit rusty.

Anyways, something I realized / remembered today – a DNS domain is not equal to a DNS zone. When creating a DNS domain under Windows, using the GUI, it is easy to equate the domain to the zone; but if you come from a *nix background then you know a zone is the zone file whereas domains are different from that.

For example here’s a domain called “” and its sub-domain “”.

domainYou would think there wouldn’t be much difference between the two but the fact is that “” is also the zone here and “” is a part of that zone. The domain “” is not independent of the main domain “”. It can’t have its own name servers. And when it comes to zone transfers “” follows whatever is set for “”. You can’t, for instance, have “” be denied zone transfers while allowing zone transfers for “” – it’s simply not possible, and if you think about it that makes sense too because after all “” doesn’t have its own name servers.

In this case the zone “” consists of both the domain “” and its sub-domain “”.

In contrast below is an example where there are two zones, one for “” and another for “”. Both domain and sub-domain have their own zones (and hence name servers) in this case.

subdomainWhen creating a new domain / zone the GUI makes this clear too but it’s easy to miss out the distinction.

New domain

New domain

New Zone

New Zone

Stub zones

We use stub zones at work and initially I had a domain “” which I wanted to create a a stub zone on another server. That failed with an error that the zone transfer failed.

transferInitially I took this to mean the stub zone was failing because the zone wasn’t getting transferred from the main server. That was correct – sort of.  Because “” isn’t a zone of its own, it doesn’t have any name servers. And the way stub zones work is that the stub server contacts the name servers of “” to get a list of name servers for the stub zone but that fails because “” doesn’t have any name servers! It is not a zone, and only zones have name servers, not (sub-)domains.

So the error message was misleading. Yes, the zone transfer failed, but that’s not because the transfer failed but because there were no servers with the “” zone. What I have to do is convert “” to a zone of its own. (Create a zone called “”, create new records in that zone, then delete the “” domain).

Worth noting: Stub zones don’t need zone transfers allowed. Stub zones work via the stub server contacting the name servers of the stub zone and asking for a list of NS, A, and SOA records. These are available without any zone transfer required.

In our case we wanted to create a stub host record. We had an A record “” and wanted to create a stub to that from another server. The solution is very simple – create a new zone called “”, create a blank A record in that with the IP address you want (same IP that was in the “” A record), then delete the previous “” A record. 

Now create a stub zone for that record:stubzoneAnd that’s it.

Just to recap: zones contain domains. A domain can be spread (as sub-domains) among multiple zones. For zone transfers and stub zones you need the domain in question to be in a zone of its own. 

DNS zone and domain by rakhesh is licensed under a Creative Commons Attribution 4.0 International License.

1 comment to DNS zone and domain