What is DNS TTL? Time To Live Explained

TTL (Time To Live) is a field in every DNS record that tells resolvers how long they can cache the record before fetching a fresh copy from the authoritative nameserver. TTL directly controls how fast DNS changes propagate across the internet.

A short TTL against a long oneTTL 300TTL 36001 h
A short TTL is fetched again and again and changes quickly; a long TTL is fetched once and changes slowly.

How TTL Works

When a resolver first looks up a DNS record, it caches the result for the number of seconds specified by the TTL. During this time, any query for the same record is served from cache — no DNS query to your nameserver occurs.

example.com.  3600  IN  A  203.0.113.1
              ^^^^
              TTL = 3600 seconds = 1 hour

After 3600 seconds, the resolver discards its cached copy and queries the authoritative nameserver again for a fresh record.

TTL Values and Their Impact

TTLDurationUse Case
601 minuteDuring active migration or failover testing
3005 minutesRecords that change occasionally (good for planning migrations)
36001 hourCommon default — balance of freshness and performance
8640024 hoursStable records like NS and MX that rarely change
6048007 daysSOA records and other very stable data

TTL Before a DNS Migration

The classic technique when planning a DNS change (e.g., moving to a new server):

  1. 48+ hours before: Lower your TTL to 300 seconds
  2. Wait for the old high TTL to expire everywhere
  3. Make the DNS change (e.g., update the A record IP)
  4. Wait 5 minutes for the new TTL to propagate
  5. After confirming everything works, raise TTL back to 3600+

This minimizes downtime because caches refresh quickly after the change.

SOA Minimum TTL

The SOA (Start of Authority) record contains a minimum TTL value that applies to negative responses (cache of "this record does not exist"). If you query for a record that doesn't exist, the resolver caches the "not found" result for this duration.

TTL Trade-offs

Low TTLHigh TTL
Changes propagate quicklyChanges take longer to propagate
More DNS queries to your serverFewer DNS queries (better performance)
Faster failover / recoveryHarder to change records quickly
Slightly higher DNS latency for usersBetter caching — faster for users
Record TypeRecommended TTLReason
A / AAAA3600 (1h)May change during server migrations
CNAME3600 (1h)Stable, but may change with CDN switches
MX3600–86400Mail servers rarely change
TXT (SPF/DMARC)3600Policy may need updates occasionally
NS86400 (24h)Very stable — only changes when switching DNS providers
SOA86400Rarely changes

Check Your Current TTL Values

Try it on your domain

See the theory in practice — run a DNS Lookup for your own domain.