This episode dissects the foundations of DNS: the hierarchical namespace from the root zone to subdomains, the anatomy of a DNS message along with its header and flags, the roles of authoritative versus recursor, the flow of iterative and recursive resolution, and the catalog of the most commonly used resource records.

Before configuring PowerDNS, you must be able to read DNS "from the inside." Episode 2 dissects the four things that frame every DNS engineer's thinking: the hierarchical namespace, message anatomy, server roles, and resource records. All four are interrelated and will keep showing up in every episode that follows.
Think of this episode as a map. When we cover DNSSEC in episode 13, you'll meet the terms zone and delegation again. When we cover primary-secondary in episode 9, you'll use the SOA serial. Understand this map first, and everything else is just going deeper.
DNS is arranged like an upside-down tree. At the top is the root zone, written as a dot .. Below it are TLDs like .com, .net, and .id. Below the TLDs are second-level domains like example.com, and so on down to subdomains like www.example.com. Each separating dot marks one level of delegation.
. <- root zone
`-- com <- TLD
`-- example <- second-level domain
`-- www <- subdomainThat delegation is carried out by a group of servers. Root servers (a-m.root-servers.net) tell you where the TLD servers are. TLD servers tell you where the authoritative servers for a second-level domain are. From there, clients finally get their answers.
There are two resolution styles that are important to distinguish:
dig +trace example.comThe command dig +trace example.com above shows the process step by step from root to the final answer — exactly like the recursive resolution a recursor performs.
A DNS message consists of a header followed by four sections: Question, Answer, Authority, and Additional. The header holds an ID for matching queries and answers, plus flags such as QR (query or response), AA (authoritative answer), and RD/RA (recursion desired/available). The QDCOUNT, ANCOUNT, NSCOUNT, and ARCOUNT fields state the number of records in each section.
dig +noall +comments example.com ANotice the line containing status: NOERROR, flags: qr rd ra ad, and QUERY: 1, ANSWER: 1. When we use dig +dnssec in episode 14, the ad flag will be the marker of a successful validation. This shows how much information fits in a tiny 12-byte header.
The Additional section can carry a special record called OPT that implements the EDNS0 mechanism. This record lets clients and servers agree on UDP payload sizes larger than 512 bytes — an important requirement for DNSSEC and large answers.
There are three roles you'll keep encountering:
aa flag for names it is the authority for.In the PowerDNS stack, all three are separate daemons. This lets you run, measure, and upgrade each one independently.
clients -> dnsdist -> recursor -> internet
-> authoritative (local zones)A resource record is the unit of DNS data. Here are the most important ones:
Every record has a TTL (time to live) that determines how long an answer may be cached. TTL is a control knob you'll use constantly, especially when moving services.
dig +noall +answer example.comEpisode 2 gives you the mental framework for the entire series: the hierarchical, delegated namespace, DNS messages with their header and four sections, the roles of authoritative, recursor, and dnsdist, and the catalog of resource records from SOA to SVCB.
Key takeaways:
In the next episode we'll cover installation and initial setup — the structure of pdns.conf, recursor.yml, and dnsdist.yml, each daemon's systemd service, and connection verification with dig @127.0.0.1. This is the first point where you'll create PowerDNS configuration that actually runs in your lab.