TTL (Time to Live)
A TTL (Time to Live) is the maximum number of seconds a DNS resolver may keep a record in its cache before it must re-query the authoritative server. It is the single biggest factor in how fast a DNS change propagates.
In plain English
If you publish an A record with a TTL of 3600, recursive resolvers around the world will cache it for an hour. Updating the record before that hour is up does not immediately reach all clients — old answers will continue to be served until each cache expires.
How it works
TTL is a 32-bit field on every DNS record, defined in RFC 1035 §3.2.1 (with negative caching governed by RFC 2308 and the SOA MINIMUM field). Recursive resolvers count the TTL down from receipt and remove the record when it hits zero; well-behaved resolvers do not exceed the value, but stub resolvers and intermediate caches may have their own ceilings. Setting TTLs is a trade-off: low TTLs (30-300 seconds) make migrations and failover fast but raise authoritative load; high TTLs (3600-86400) cut load and improve cache hit rates but slow change propagation. Operational pattern: lower the TTL a day or two before any planned change, perform the migration, then raise it again once you are confident the new value is stable. Negative answers (NXDOMAIN, NODATA) are cached per RFC 2308 using the lesser of the SOA MINIMUM and the SOA TTL.
Related terms
- DNS — base protocol
- SOA — controls negative-cache TTL
- Recursive DNS — applies TTL
- Authoritative DNS — publishes TTL
- NXDOMAIN — cached per SOA MINIMUM and TTL
- A record — most commonly tuned
- RPZ — TTL governs how fast a block rolls out
SecDNS perspective
SecDNS lets you set per-record TTLs as low as 30 seconds and includes a "pre-migration" preset that automatically drops all critical records to 60 seconds 24 hours before a scheduled change.