SecDNS

TTL (Time to Live)

A DNS TTL is the number of seconds a resolver may cache a record before re-querying. Lower TTLs propagate changes faster, higher TTLs reduce resolver load.

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.

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.

Frequently asked questions

What TTL should I use?

300 seconds is a sensible default for records that change. Use 3600 or higher for stable records like NS and SOA. Drop to 60 a few hours before a planned migration.

Does TTL guarantee propagation time?

No. The TTL is an upper bound for well-behaved resolvers. Some stub resolvers and middleboxes ignore TTL and cache longer, so always plan for stragglers when migrating.