DNS

What is TTL (Time to Live)?

Time to Live (TTL) is a value in DNS records that specifies how long a resolver or browser should cache a DNS response before requesting a fresh copy from the authoritative nameserver. TTL is measured in seconds, with common values ranging from 300 (5 minutes) to 86400 (24 hours).

How Does Ttl Work?

When a DNS resolver looks up a domain name, the response includes a TTL value set by the domain administrator. The resolver caches this result and serves it to subsequent queries until the TTL expires, at which point it fetches a new record from the authoritative nameserver. Lower TTL values mean DNS changes propagate faster but generate more queries to the nameserver, while higher values reduce DNS query load but delay propagation of updates.

TTL management is particularly important during DNS changes such as server migrations, IP address updates, or failover events. A common practice is to lower the TTL well before a planned change, allowing cached records to expire quickly so the new configuration takes effect faster. After the change is verified, the TTL can be raised back to a longer value to reduce DNS lookup overhead and improve resolution speed for visitors.