TTL (Time To Live) is a value, expressed in seconds, set on a DNS record that tells caching resolvers how long they may keep the record before querying the authoritative nameservers again. Short TTLs allow faster propagation of changes; long TTLs reduce lookup overhead and DNS query load.
Why it matters
TTL governs how quickly the internet sees a change you make to a record — whether you are migrating hosting, swapping a dns-a-record, rotating mail providers, or moving a dns-cname-record to a new CDN. If the TTL was set to 86400 (24 hours), some clients can still resolve the old IP a full day after the change. Conversely, very short TTLs increase resolver load and can become a single point of failure if your authoritative nameservers go down. Email and security records like SPF or DMARC also benefit from predictable TTLs so receivers cache them consistently.
How to use it
- Lower TTL to 300 seconds at least 24–48 hours before any planned DNS migration.
- After the change has propagated and stabilised, raise it back to a longer value such as 3600 or 86400.
- Avoid TTLs below 30 seconds unless you genuinely need failover at that resolution — most resolvers cap or ignore very low values anyway.
- Remember resolvers do not always strictly honour TTL; ISPs and corporate caches may extend it.
- Pair TTL planning with dnssec and consistent NS/SOA records.