Skip to content
inetGeek

TTL

TTL is the number of seconds a resolver may cache a DNS answer. It is the single number that decides how long a change takes to take effect.

Check this on a domain with DNS Propagation →

01.

What TTL controls

Every DNS record carries a TTL in seconds. A resolver that receives an answer may serve it from cache until the TTL elapses, and is not required to ask again before then.

Nothing in DNS pushes a change out. What people call propagation is simply caches expiring at their own pace.

02.

The old value is what governs a change

When you change a record, resolvers holding the previous answer keep serving it for the remainder of the previous TTL. The new, shorter TTL only applies once they have fetched the new record.

That is why lowering a TTL has to happen before a migration, not during it. Drop it to a few minutes at least one full old-TTL period ahead, migrate, then raise it again.

Caches expiring after a change48 resolvers

TTL before the change

+0s
old
48 answer 192.0.2.10
new
0 answer 198.51.100.7

Illustrative zone and resolvers. Each square is one resolver's cache; it keeps answering the old address until the TTL it stored before the change runs out. The propagation checker shows the same thing for a real record.
03.

Choosing a value

Short TTLs make changes fast and increase query volume; long TTLs do the reverse and improve resilience if your nameservers become unreachable.

A common pattern is hours for records that rarely change, such as MX and NS, and minutes for records involved in an active migration.

Negative answers are cached too, governed by the SOA minimum field rather than the record's own TTL. Creating a record that someone has already queried for can take longer to appear than the TTL suggests.

Related records