Every finding in the rest of this course is something you confirm with dig. A control panel shows you what it stored; dig shows you what the internet can actually see, and the difference between those two is where a surprising number of problems live.
Reading an answer
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41255;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1;; QUESTION SECTION:;example.com. IN A;; ANSWER SECTION:example.com. 69 IN A 104.20.23.154example.com. 69 IN A 172.66.147.243
status: NOERROR— the query succeeded.NXDOMAINmeans the name does not exist;SERVFAILmeans the server could not answer, which under a validating resolver often means DNSSEC failed.flags—qrresponse,rdrecursion desired,rarecursion available. The one to look for isaa, authoritative answer, which appears only when you are talking to a server that holds the zone.ANSWER: 2— two records returned. Counts here let you spot an empty NOERROR at a glance.- The TTL column,
69, is time remaining if you asked a resolver, or the configured value if you asked an authoritative server.
Checked 2026-09-12.
The commands worth knowing
| Command | Use |
|---|---|
dig +short TXT example.com | Just the data. Right for scripts and quick checks. |
dig +noall +answer A example.com | The answer section with TTLs, without the rest. |
dig +trace example.com | Walk from the root yourself. Shows where an answer comes from. |
dig @ns1.example.com A www.example.com | Ask one specific server. The only way to know what you actually published. |
dig +norecurse @a.gtld-servers.net NS example.com | The parent’s delegation, not the child’s copy. |
dig +dnssec A example.com | Include RRSIG records and the ad flag. |
dig -x 198.51.100.25 | Reverse DNS. |
The habit worth forming
When something looks wrong, ask the authoritative server directly before anything else. It separates "I published the wrong thing" from "I published the right thing and a cache has not caught up", and those two have completely different responses.
Three ways a check misleads you
- Your resolver is not their resolver. A corporate resolver may have split-horizon views, local overrides, or a filtering policy. Confirm against a public resolver and against the authoritative server before concluding anything about the outside world.
- Not all of your nameservers necessarily agree. If a zone transfer has failed, one secondary can be serving stale data while the rest are correct. Query each listed nameserver individually and compare SOA serials — a divergence there is the single clearest symptom.
- ANY does not mean all. Many servers refuse or minimise ANY queries. An empty ANY response is not evidence that a name has no records.
# do the serials agree across every authoritative server?
for ns in $(dig +short NS example.com); do
printf '%-28s ' "$ns"
dig +short @"$ns" SOA example.com | awk '{print $3}'
done