The short answer

A domain is a name and everything below it in the DNS tree. A zone is the part of that tree one set of authoritative servers answers for, starting at its apex and stopping wherever part of the tree is handed to someone else. That hand-off is a delegation: NS records in the parent zone mark a zone cut and name the servers for the child zone. example.com is one domain, but if dev.example.com is delegated it is served as two zones, often by two different providers.

Domain versus zone

ConceptWhat it coversExample
DomainA node in the tree and every name below it, whoever serves themexample.com includes www.example.com and api.dev.example.com
ZoneThe names one set of authoritative servers answers for, from the apex down to the next cutsThe example.com zone, which stops at dev.example.com if that is delegated
ApexThe top name of a zone. It holds the zone's SOA record and its own NS records.example.com in the example.com zone
Zone cutThe boundary between a parent zone and a child zone, marked by NS records in the parentBetween example.com and dev.example.com
SubdomainAny name below another. It only becomes a separate zone if someone delegates it.www.example.com is usually just a record in the parent zone

Registering example.com gives you a delegation from the .com zone. Everything else is your choice: one zone for the whole domain, or a few child zones run by different teams or providers.

An annotated zone with a delegation

This is the example.com zone. It answers for most names itself and delegates dev.example.com to another provider:

$ORIGIN example.com.
@            3600  IN SOA   ns1.example.com. hostmaster.example.com. ( 2026111001 7200 900 1209600 300 )
@            86400 IN NS    ns1.example.com.
@            86400 IN NS    ns2.example.net.
ns1          3600  IN A     192.0.2.53
@            3600  IN A     192.0.2.10
www          3600  IN CNAME example.com.
@            3600  IN MX    10 mail.example.com.
mail         3600  IN A     192.0.2.25

dev          86400 IN NS    ns1.dev-dns.example.net.
dev          86400 IN NS    ns2.dev-dns.example.net.
dev          3600  IN DS    12345 13 2 9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08
LinesRole
SOA and the apex NS recordsMake this the authoritative zone for example.com. Every zone has exactly one SOA, at its apex.
ns1 IN AAn address for a nameserver inside the zone. The .com registry needs the same address as glue.
www, mail and the MX recordOrdinary records. They are subdomains, but not separate zones.
dev IN NSThe zone cut. This zone no longer answers for dev.example.com or anything below it; it refers resolvers to the listed servers.
dev IN DSOnly if the child zone is DNSSEC-signed: it links the chain of trust to the child's key. DS lives on the parent side of the cut. (The digest shown is an example value.)

On the provider for dev.example.com, the child zone has its own SOA and its own NS records at its apex, and holds every record below it. The child's NS set should match the parent's; a mismatch is a common cause of lame delegation.

Delegating a subdomain, step by step

  1. Create the child zone on the provider that will run it (for example dev.example.com) and note the nameservers it assigns.
  2. Add the records the child needs there, before delegating, so nothing breaks at the switch.
  3. Add NS records in the parent zone for dev, listing the child's nameservers exactly. This is done in the parent's DNS, not at the registrar: a registrar only manages delegations from the TLD.
  4. Add glue only if a child nameserver's name is inside the child zone itself (for example ns1.dev.example.com). See delegation and glue records.
  5. Add a DS record in the parent if the child is signed, and only after the child serves its DNSKEY.
  6. Remove old records for those names from the parent. Data below a cut in the parent zone is ignored (occluded), apart from glue, and only confuses the next person.

When retiring a child zone, remove the parent's NS records first. A delegation that points at a provider account you no longer hold is a dangling record, and someone else may be able to claim it.

Checking zones and delegations yourself

CommandWhat it shows
dig +trace dev.example.comEach referral from the root down, so you can see every zone cut on the way
dig +norecurse @ns1.example.com dev.example.com NSThe parent's referral: NS records in the authority section and no aa flag
dig +norecurse @ns1.dev-dns.example.net dev.example.com NSThe child's own NS set, with the aa flag. It should match the parent's.
dig www.dev.example.com SOAFor a name that is not an apex, the authority section shows the SOA of the zone that holds it, which tells you which zone a name lives in
Resolve-DnsName dev.example.com -Type NSThe same NS lookup from Windows PowerShell

Common mistakes

  • A CNAME at the apex. The apex must hold SOA and NS records, and a CNAME cannot sit next to other data. See CNAME at the zone apex.
  • Parent and child NS records that disagree. Resolvers may use either set, so a server listed only on one side gets some traffic and not the rest.
  • Records left in the parent below a cut. They are never served, but people edit them and wonder why nothing changes.
  • Delegating to a provider before the child zone exists there. Resolvers get REFUSED or SERVFAIL until it is created.
  • Forgetting DS on a signed child, or leaving an old DS after moving it. The first leaves the child unsigned in practice; the second makes validating resolvers fail. See DNSSEC failures.

How DNS Panopticon helps

Security Posture checks the zone a domain is delegated to: whether each listed nameserver answers for it (lame delegation), whether the SOA is present and sensible, and whether DNSSEC validates. Domain Visualizer draws the NS, SOA and other records resolvers see for a name, including a subdomain, and Zone Analyzer reads a zone export so you can review the apex, delegations and glue it contains. None of them changes your DNS.

FAQ

Is every subdomain its own zone?

No. Most subdomains, such as www, are ordinary records in the parent zone. A subdomain only becomes a separate zone when NS records in the parent delegate it.

Do I delegate a subdomain at my registrar?

No. The registrar manages the delegation of your registered domain from the TLD. Delegating a subdomain means adding NS records inside your own zone at your DNS provider.

Why would I delegate a subdomain?

To let another team or service run its own records, for example a development environment, a cloud platform that needs to manage names automatically, or a separate provider for a product line.

Where does the DS record go?

In the parent zone, next to the NS records for the child. The child zone publishes the matching DNSKEY.

Sources and further reading