Lesson 2 of 9 · 27m
Zone Files, Delegation, and Glue That Survives Change
Read and edit zone data with a precise mental model of SOA, NS delegation, glue records, TTLs, and serial behavior.
A zone file looks harmless: names on the left, values on the right. Then someone changes a nameserver without updating glue, forgets a trailing dot, or publishes two contradictory NS sets and half the Internet resolves one reality while the other half resolves another. Zone management is exacting because DNS is exact.
A zone is a bounded authority
The zone starts at a name such as sudosecurity.org and contains records below it until another delegated boundary. The critical records are usually:
$TTL 300
@ IN SOA ella.ns.cloudflare.com. dns.cloudflare.com. (
2026113001 ; serial
7200 ; refresh
3600 ; retry
1209600 ; expire
300 ) ; negative TTL
@ IN NS ella.ns.cloudflare.com.
@ IN NS nick.ns.cloudflare.com.
www IN A 203.0.113.20
vpn IN A 198.51.100.14Every fully qualified name ends in a dot. vpn is relative to the zone origin; vpn.sudosecurity.org. is absolute. A missing trailing dot in a target such as a CNAME or NS value can silently append the zone name and create a completely different destination.
Delegation is a contract across two zones
The parent zone publishes the child nameservers. The child zone also publishes its NS records. They should match:
dig org NS @a0.org.afilias-nst.info +norecurse
dig sudosecurity.org NS @ella.ns.cloudflare.com +norecurseIf parent and child disagree, resolvers may follow either depending on cache state and implementation. That creates the classic incident where some users see the migration and others do not. During provider changes, update both sides deliberately and expect caches to preserve the old answer until TTL expiry.
Glue exists only for in-bailiwick nameservers
If the nameserver for ops.sudosecurity.org is ns1.ops.sudosecurity.org, a resolver cannot look up ns1.ops.sudosecurity.org without first knowing where ops.sudosecurity.org lives. The parent must provide address glue:
ops.sudosecurity.org. IN NS ns1.ops.sudosecurity.org.
ops.sudosecurity.org. IN NS ns2.ops.sudosecurity.org.
ns1.ops.sudosecurity.org. IN A 203.0.113.53
ns2.ops.sudosecurity.org. IN A 198.51.100.53Glue is not normal authoritative zone data served everywhere. It is parent-side address information needed to break the circular dependency. If nameservers are outside the child namespace, such as ella.ns.cloudflare.com, no glue for them belongs in the child delegation.
The SOA serial is operational machinery
Traditional master/slave DNS uses the SOA serial to decide whether zone data changed. Increment it on every edit. Many hosted providers hide this detail, but if you run BIND or NSD manually, a stagnant serial means secondaries can keep serving the old zone while the primary proudly serves the new one.
Field notes
- Check zone syntax with
named-checkzone sudosecurity.org db.sudosecurity.orgbefore reloads. - Keep parent NS, child NS, and glue inventory in the change ticket; “updated DNS” is not an auditable change description.
- Beware copying records between zones: relative names silently re-root under the new origin.
- Long TTLs reduce query volume, but they also preserve mistakes. Lower TTLs before risky migration, not after the mistake is cached.
Was this lesson helpful?