Protocols
Saved & recent

DNS TTL

Also called: DNS time to live, record TTL, DNS cache expiry

A DNS time to live, or TTL, specifies how many seconds a record may normally remain in a cache before fresh information is needed. A caching resolver reduces the remaining lifetime as time passes. The TTL concerns cached DNS data; it is separate from the hop-limiting field used in IP packets.

For example, a record cached with a TTL of 300 seconds has about 180 seconds remaining two minutes later. Changing the authoritative record does not instantly invalidate copies already cached elsewhere. TTL is therefore not a universal countdown for a DNS change to finish “propagating.” Under configured serve-stale behavior, a resolver may temporarily answer with expired data when attempts to refresh it fail.

Read first
DNS resolution
Related
DNS, DNSSEC, HTTP caching
Further reading
IETF RFC 8767 — Serving Stale Data to Improve DNS Resiliency
resolver cache timeline cached DNS answer t = 0 s t = 120 s t = 300 s TTL 300 s 180 s remaining expiry · refresh authoritative change no pushed invalidation refresh attempt refresh fails optional serve-stale exception after expiry
Illustrative cache lifetime: a 300-second TTL counts down locally, while an authoritative change does not erase existing cached copies.

View in the full Protocols collection