04 / Networking
The quiet life of a DNS lookup.
A name, an answer, and a little patience. Follow the caches between a question and its destination.
DNS turns names into records, but a lookup is rarely a single conversation with the authoritative server. Applications, operating systems, and recursive resolvers can each remember an earlier answer.
Start with the record type
dig example.org A +noall +answer
dig example.org AAAA +noall +answerAn A record contains an IPv4 address; an AAAA record contains an IPv6 address. Check them separately. A correct answer for one does not establish what a client will receive for the other.
Read the remaining lifetime
The TTL is a cache lifetime, expressed in seconds. Reducing it on the authoritative server does not shorten the lifetime of an answer already stored by a recursive resolver.
Remember that absence can be cached
An NXDOMAIN response can also be cached. Creating a record does not immediately remove that earlier negative answer from every resolver. Compare the response status as well as the answer section.
Keep a small observation log
Record the resolver, record type, result, and time. Recheck after the relevant lifetime instead of repeatedly changing a correct record.
Further reading: RFC 2308: Negative caching.