DNS TTL Explained: Caching, Propagation and Best Practices
By DNSRadar
DNS TTL, or Time to Live, tells recursive resolvers how long an answer may remain cached. It balances lookup efficiency against how quickly future changes become visible.
Quick answer
TTL is the permitted cache lifetime of a DNS record set. A recursive answer usually shows the remaining lifetime. Changing the authoritative TTL does not shorten an existing cached copy, and a missing name can have its own negative cache lifetime.
Diagnostic checklist
- Record the previous TTL and when the change was published.
- Compare the exact name and type at authoritative and recursive servers.
- For NXDOMAIN or NODATA, inspect the SOA in the authority section.
- Verify the intended value and the application before ending a migration.
Read the published TTL and the remaining cache lifetime separately
The authoritative nameserver publishes the TTL for a resource record set. A recursive resolver can cache that set and return its remaining lifetime. Two resolvers can therefore return the same IPv4 address with different TTLs without disagreeing on the record value.
In the illustrative output below, the authoritative TTL is 300 seconds and a recursive copy has 215 seconds remaining. The addresses and example names are documentation fixtures, not measurements of a customer domain. Replace the hostname and authoritative server with your own before running the commands.
$ dig @ns1.example.net www.example.com A +norecurse +noall +answer
www.example.com. 300 IN A 192.0.2.20
$ dig @1.1.1.1 www.example.com A +noall +answer
www.example.com. 215 IN A 192.0.2.20Repeat a lookup without treating every TTL reset as a fault
Query the same resolver IP and the same name and record type, keeping the full output and timestamps. If the answer value stays unchanged while the TTL decreases, the observation is consistent with a cached copy. A fresh value near the published TTL can reflect a refresh.
A resolver IP can be anycast or front several cache nodes, and providers can prefetch popular records. You may not observe a perfectly decreasing counter on every request. Compare values and failure states as well as TTL; do not infer a broken zone from that counter alone.
date -u
dig @1.1.1.1 www.example.com A +noall +comments +answer
sleep 10
date -u
dig @1.1.1.1 www.example.com A +noall +comments +answerPlan a TTL reduction before the actual migration
Consider a planned cutover at 10:15 UTC with an old TTL of 3600 seconds. Lower it to 300 at or before 09:00, publish the change on every authoritative server and allow at least the previous cache lifetime to pass. Then verify the shorter value before changing the address.
Lowering the TTL at 10:15 does not shorten copies already cached with the old hour-long lifetime. Keep the old service available for clients that still reach it. The record TTL is one part of the plan: parent delegation, local caches and other record types have their own behavior.
- Before: record the old value, old TTL and the active authoritative nameservers.
- During: verify the intended value on each authoritative server, then compare recursive resolvers.
- After: verify A and AAAA independently and test the application, TLS and mail services affected by the change.
- Once stable: choose a normal TTL appropriate to the service and the authoritative DNS capacity.
Why a newly created name can still return NXDOMAIN
A resolver can cache a negative answer obtained before you created the name. The new A record's TTL does not control that existing negative entry. Inspect the response status and the SOA in the authority section instead.
RFC 2308 defines the initial negative cache lifetime as the smaller of the SOA record TTL and the SOA MINIMUM field. For example, a published SOA TTL of 300 with MINIMUM 900 gives an initial limit of 300 seconds. A recursive response showing SOA TTL 180 represents a remaining lifetime; the final field 900 is not a fresh 900-second waiting period.
NXDOMAIN reports a missing name. NOERROR with no relevant answer can instead mean the requested record type is absent, known as NODATA. Both need a different interpretation from SERVFAIL. First confirm the authoritative answer for the exact name and type.
dig @1.1.1.1 new.example.com A +noall +comments +answer +authority
dig @ns1.example.net new.example.com A +norecurse +noall +comments +answer +authorityWhen waiting for the displayed TTL is not enough
A matching TTL does not establish that the address is correct, the site is reachable or DNSSEC validation works. If authoritative servers disagree, correct the source data. If validating resolvers return SERVFAIL, investigate delegation and DNSSEC rather than extending an assumed propagation deadline.
RFC 8767 allows configured resolvers to serve stale data when refreshing fails. Browser and application caches can also differ from the recursive response. A TTL-based estimate is useful for one cached answer, not a guaranteed completion time for every Internet user.
What DNSRadar can show for a TTL investigation
Run an A or AAAA check and compare each resolver's answer with the expected new address. DNSRadar reports the lowest TTL among the returned addresses for that resolver. Different record values matter more than a small difference in remaining TTL.
Other record types currently do not expose TTL in DNSRadar. Use the dig commands above when you need SOA negative-cache evidence or authoritative TTLs. Save the check time, resolver IP and expected value so a later comparison answers the same question.
Sources and editorial approach
Technical documentation by DNSRadar. Examples using example.com and documentation addresses are illustrative; adapt commands to your zone and compare authoritative answers before changing production.
How we measure and the tool's limitations · Report a correction