Learn what DNS TTL means, why it affects caching, and how to choose sensible TTL values before website or email changes.
- Plan DNS changes better
- Understand resolver caching
- Choose sensible TTL values
What TTL means
TTL means time to live. It is a value in seconds that tells resolvers how long they may cache a DNS answer before checking again. A TTL of 300 is five minutes. A TTL of 3600 is one hour.
Why lower is not always better
Low TTL values can make planned changes easier because caches expire sooner, but they also cause more frequent DNS lookups. Higher TTL values reduce lookup frequency but can make changes slower to appear.
Before a migration
Before moving a website or email service, lower the TTL in advance and wait for the old higher TTL to expire. Then make the record change. Once the move is stable, raise the TTL back to a sensible value.
Checking TTL
Use dig example.com A to see TTL values in the answer section. When comparing resolvers, remember that cached answers may show remaining TTL, not necessarily the original zone value.
Quick commands to try
dig example.com Adig example.com MX +shorthost -t TXT example.comPractise the command line side
DNSNow gives you quick web checks. For hands-on Linux command practice, use CommandLineQuiz dig Command Builder, the Linux Troubleshooting Hub and the Bash Scripting Hub.
FAQs
What is a good TTL for DNS records?
It depends on how often records change. Common values range from a few minutes for planned changes to one hour or more for stable records.
Does TTL control nameserver changes?
TTL affects cached DNS answers, but nameserver delegation changes can involve additional caching at different levels.
Why does dig show a lower TTL than my DNS panel?
A resolver may show the remaining cached TTL rather than the full original value.