DNS Records, Delegation, and DNSSEC
"The primary goal is a consistent name space which will be used for referring to resources." — RFC 1034, Domain Names — Concepts and Facilities (1987)
Chapter 1.9 introduced DNS as the internet's phone book: a name goes in, an address comes out. That is the right first mental model and a poor final one. DNS is a distributed database with delegation, caching, and a security model of its own. The phone book does not just map names to numbers; it decides who is allowed to answer for a name, how long the answer may be cached, and — if DNSSEC is in use — whether the answer is authentic.
This chapter is about that machinery. It is the layer where a single wrong record can take down email, a stale TTL can keep it down, and a missing signature can let an attacker answer in your place. By the end you should be able to follow a query from the root to an authoritative server, read a zone file, explain why a CNAME at the apex breaks mail, and describe what DNSSEC does and does not protect.
Zones and Authority
DNS data is organized into zones. A zone is a portion of the namespace that one organization is responsible for — example.com, for instance, including everything below it unless a subdomain is delegated elsewhere. The servers that hold the authoritative copy of a zone are its authoritative name servers.
The SOA record at the top of every zone is the zone's metadata: the primary server, the responsible mailbox, a serial number, and timers for refresh, retry, expire, and negative caching. The serial number is how secondary servers know a zone changed — often a date like 2026111701. The timers are how caching resolvers know how long to remember a "no such name" answer.
Authority is delegated downward. The root zone does not contain a record for www.example.com; it contains a delegation to the .com servers. The .com zone contains a delegation to example.com's name servers. Those servers hold the actual records.
Root (.)
└── NS for .com → a.gtld-servers.net
└── NS for example.com → ns1.example.com
└── A www.example.com → 203.0.113.10
An NS record names a delegated server. When the delegated server's name is inside the zone it serves — ns1.example.com for example.com — the parent must also provide a glue record: the A/AAAA address of that server. Without glue, the resolver would need to resolve the name of the server it is trying to reach, which is a circular dependency.
The Records That Matter
The common record types are not interchangeable, and a few rules trip people up constantly:
| Record | Purpose | Gotcha |
|---|---|---|
A |
Name to IPv4 address | Multiple A records load-balance |
AAAA |
Name to IPv6 address | Absence does not mean "no IPv6" |
CNAME |
Alias to another name | Cannot coexist with other records at the same name; not allowed at the zone apex |
MX |
Mail server, with a preference | Lower preference wins |
TXT |
Arbitrary text | Used for SPF, DKIM, DMARC, domain verification |
NS |
Delegation | Must point at a name, not an IP |
SRV |
Service location with port and priority | Used by SIP, XMPP, some service discovery |
CAA |
Which CAs may issue certificates | A missing CAA means any CA may |
PTR |
Reverse lookup (IP to name) | Lives in in-addr.arpa or ip6.arpa |
SVCB/HTTPS |
Service binding and hints | How modern clients discover HTTP/3 and alternative endpoints (RFC 9460) |
The CNAME-at-apex rule deserves its own warning. A CNAME says "this entire name is an alias; look over there for everything." If example.com were a CNAME, it could not also have MX or NS records, because those would be shadowed. The usual workaround is a provider-specific ALIAS/ANAME record, which resolves at query time and returns an A/AAAA record instead of a CNAME.
example.com instead of www.example.com is a classic outage. It conflicts with the MX records that route mail and the NS records that define the zone, and many providers will reject the zone outright. If a hosting provider tells you to point the root at them, use their ALIAS/ANAME feature, not a CNAME.TTL, Caching, and Negative Answers
Every record carries a TTL. Resolvers may cache the answer for that many seconds. A long TTL reduces load and latency; a short TTL lets you change an address quickly. The trade-off is why migrations often start by lowering the TTL a day in advance: you cannot force caches to expire early, but you can make them expire sooner once they refresh.
Negative answers are cached too. The SOA's minimum TTL controls how long a resolver remembers "this name does not exist." That is why a newly created record can appear dead for a while even after you add it: resolvers are still holding the negative answer.
Two protocol details make modern DNS workable. EDNS0 (RFC 6891) extends the original 512-byte UDP limit, advertises the resolver's buffer size, and carries DNSSEC data. Without it, a large answer is marked truncated and the resolver retries over TCP. Zone transfers — AXFR for a full copy and IXFR for an incremental one — are how secondary servers stay in sync; they run over TCP and should be restricted to known secondaries.
DNSSEC: Signatures, Not Encryption
DNS was designed without authentication. An attacker who can answer before the real server — on a shared Wi-Fi, at a compromised resolver, or through cache poisoning — can return any address they like. DNSSEC (RFC 4033, 4034, 4035) adds cryptographic signatures to records so a validating resolver can tell whether an answer really came from the zone that owns the name.
The mechanism is a chain of trust:
- Each zone signs its records with a private key and publishes the signatures as RRSIG records.
- The public key is published as a DNSKEY record.
- The parent zone publishes a DS record containing a hash of that key.
- The root's key is the trust anchor, distributed out of band with resolvers.
A validating resolver walks the chain from the root down, checking each DS/DNSKEY pair. If a signature is missing or wrong, the answer is marked bogus and refused. If a zone is unsigned, the resolver can prove that too, using NSEC records that enumerate which names do not exist. NSEC3 (RFC 5155) hashes the names instead, so the denial-of-existence proof does not reveal the zone's contents.
DNSSEC provides integrity and authenticity, not confidentiality. It does not encrypt queries; anyone on the path can still see which name you asked for. That is what DNS over TLS (DoT, port 853, RFC 7858), DNS over HTTPS (DoH, port 443, RFC 8484), and DNS over QUIC (DoQ, UDP 853, RFC 9250) address, by encrypting the transport between the client and the resolver. They are complementary: DoT/DoH protect the conversation, DNSSEC protects the answer itself.
DNS without DNSSEC tells you what someone said. DNSSEC tells you whether the zone that owns the name actually said it.
Frequently Asked Questions
Does DNSSEC encrypt my DNS queries? No. It signs answers so they cannot be forged. To hide the query from the network, use DNS over TLS or DNS over HTTPS to a resolver you trust. The two mechanisms solve different problems.
Why does a CNAME not work at the root of my domain? Because a CNAME claims the entire name as an alias, and the root must also carry NS and SOA records. Those cannot coexist with a CNAME. Use an ALIAS/ANAME record if your provider supports it.
How long should a TTL be? Long enough to cut query volume and latency, short enough that a change propagates in a reasonable time. Five minutes to an hour is common for records that change; a day is common for stable infrastructure. Lower it before a planned migration.
What is the difference between an authoritative server and a resolver? An authoritative server holds the real records for a zone and answers from them. A resolver asks other servers, caches the answers, and returns them to clients. Most clients talk to a resolver; the resolver talks to authoritative servers.
Further Reading
- RFC 1034 — Domain Names: Concepts and Facilities and RFC 1035 — Domain Names: Implementation and Specification
- RFC 4033, RFC 4034, and RFC 4035 — DNSSEC
- RFC 5155 — DNSSEC Hashed Authenticated Denial of Existence (NSEC3)
- RFC 6891 — Extension Mechanisms for DNS (EDNS0)
- RFC 7858 — DNS over TLS and RFC 8484 — DNS over HTTPS
- Cricket Liu and Paul Albitz, DNS and BIND (O'Reilly), for zone files and operational practice.
Fun Facts and Notes
- The root zone is served by 13 named server identities, but each is anycast across many physical locations. There are far more than 13 machines.
- The
.comzone alone contains well over a hundred million names, which is why TLD servers are built for query volume rather than for storing the whole internet. - DNS uses UDP port 53 for most queries and TCP port 53 for large answers and zone transfers. DoT uses 853; DoH hides inside HTTPS on 443.
- The
SOAserial number is often a date like2026111701, a convention that makes it obvious when the zone last changed.