What is TTL?
TTL (Time To Live) tells a DNS cache how long it may normally reuse a record before refreshing it. DNS expresses this lifetime in seconds. A TTL of 3600 means one hour of ordinary caching after the record is received. It does not mean that every user will see a DNS change exactly one hour after an administrator saves it. RFC 1034 describes this distributed caching model.How cached answers age
An authoritative nameserver publishes the records for its zone. A recursive resolver obtains an answer and may cache it, counting down the TTL as time passes. Later clients can receive the cached answer without another authoritative lookup.
Published record: www.example.com. 3600 IN A 192.0.2.10
Resolver receives it: 3600 seconds remain
Ten minutes later: about 3000 seconds remain
After normal expiry: resolver needs a fresh answer
These are illustrative values, not a measurement. A cache may discard records before their TTL expires. A zero TTL means the data is usable for the current transaction and should not be retained for later reuse. Record format and TTL semantics are specified in RFC 1035.
Choosing a useful value
| Illustrative TTL | Cache lifetime | Question to consider |
|---|---|---|
| 300 | 5 minutes | Do changes need to become visible quickly? |
| 3600 | 1 hour | Is a moderate refresh interval suitable? |
| 86400 | 24 hours | Is this record stable enough for longer caching? |
A shorter TTL usually creates more refresh queries. A longer TTL allows more reuse and can help during temporary authoritative outages, but cached old answers can persist longer after a change. Neither value guarantees a particular response time. Choose according to the record's purpose, expected change frequency and operational requirements. RFC 9199 explains why there is no single best TTL for every situation.
Planning a DNS change
Lowering a TTL does not reach back into caches that already hold the previous value. If a resolver cached a record with a 24-hour TTL just before you lower it, that cached copy can retain its original remaining lifetime.
For a planned migration, lower the relevant TTL sufficiently early for previously cached copies to age out. Confirm the lower value on the authoritative nameservers before changing the destination. Keep the old destination working during the transition, monitor the results and raise the TTL later if appropriate.
Nameserver and DNSSEC changes need particular care: parent-zone delegation records, glue and DS records can have their own TTLs. Changing an A record's TTL does not shorten those lifetimes.
Why there is no universal propagation deadline
Authoritative updates and cache expiry are separate steps. Different resolvers obtained their answers at different times. Applications may also retain DNS results or existing network connections. Negative answers, such as a name not existing, have separate caching rules.
Some resolvers can return expired data when they cannot obtain a fresh answer, under the serve-stale mechanism in RFC 8767. This supports availability during failures but makes a published TTL unsuitable as an absolute global rollout deadline.
Checking a TTL
dig example.com A
dig example.com NS
In the answer section, the number before the record class is the TTL. A recursive answer commonly shows the remaining cache lifetime. To compare with the published value, query an authoritative nameserver directly and check the authoritative-answer flag. Record the resolver, record type and observation time when investigating differences; one successful lookup only describes that observation.