DNS TTL is a small setting with a big job. It controls how long DNS information can stay cached before it needs to be checked again.
Choosing the right TTL can make DNS changes smoother, help with migrations and failover, and reduce unnecessary DNS queries.
What Is DNS TTL?
DNS TTL stands for Time to Live. It tells DNS resolvers how long they can keep a DNS record in cache before requesting a fresh version.
TTL is measured in seconds. For example, a Time to Live of 3600 seconds means the DNS record can usually stay cached for one hour.
Some common TTL values are:
- 300 seconds = 5 minutes
- 1800 seconds = 30 minutes
- 3600 seconds = 1 hour
- 86400 seconds = 24 hours
In simple terms, a lower TTL means DNS information is refreshed more often, while a higher TTL allows it to stay cached for longer.
How Does DNS TTL Work?
When someone visits a website, their DNS resolver needs to find the IP address connected to the domain name.
Once the resolver receives that information, it can store it temporarily in cache. The TTL tells the resolver how long that cached answer should remain valid.
For example, imagine your domain points to the IP address 192.0.2.1 and has a TTL of 3600 seconds. A resolver can continue using that answer for up to one hour before it needs to ask for the record again.
After the Time to Live expires, the resolver can request a fresh DNS answer the next time someone needs it.
This caching process is useful because the same DNS lookup does not have to be repeated every single time.
Why Does DNS TTL Matter?
TTL becomes especially important when you make changes to your DNS records.
Imagine that your website moves to a new server. You update the A record with the new IP address, but some DNS resolvers may still have the old address stored in cache.
Until that cached record expires, some visitors may continue reaching the old server.
This is why DNS changes do not always appear everywhere at exactly the same time.
A shorter TTL usually means old information expires sooner. A longer TTL means cached data can remain available for more time.
DNS TTL and DNS Propagation
DNS TTL and DNS propagation are closely connected.
When you change a DNS record, different resolvers around the Internet may still have older versions stored in cache. As those cached records expire, the resolvers request the updated information.
This is one reason DNS changes may appear quickly for one person but take longer for someone else.
There is also an important detail to remember: lowering the TTL after making a DNS change does not remove records that are already cached.
If you are preparing for an important DNS change, it is better to reduce the Time to Live beforehand.
Low TTL vs. High TTL
Both low and high TTL values have advantages.
A low Time to Live gives you more flexibility because DNS information is refreshed more frequently. This can be useful when you expect to make changes or need traffic to move quickly between different servers.
A high Time to Live keeps records cached for longer. This can reduce the number of DNS queries reaching your authoritative DNS servers and works well for stable records.
A simple way to look at it is:
| TTL Type | Main Advantage | Best Used For |
|---|---|---|
| Low TTL | Faster DNS refresh | Migrations, testing, failover |
| Medium TTL | Balance between caching and flexibility | Normal websites and services |
| High TTL | Longer caching | Stable records that rarely change |
The best TTL is not always the shortest one. It should match how the DNS record is actually being used.
What Is a Good DNS Time to Live Value?
For many normal DNS records, 3600 seconds, or one hour, is a practical value.
It gives resolvers enough time to cache the record while still allowing changes to be picked up within a reasonable period.
Shorter values such as 300 seconds can be useful when preparing for a migration or another important change.
Longer values such as 14400 or 86400 seconds may be suitable for records that rarely change.
For example:
- 300 seconds: testing, migrations, temporary changes
- 1800 to 3600 seconds: common website and service records
- 14400 seconds: stable DNS records
- 86400 seconds: records that almost never change
These values are examples rather than strict rules. The right TTL depends on your infrastructure and how quickly you may need to make changes.
Should You Always Use a Low TTL?
Not necessarily.
A very low Time to Live means DNS information expires more often, so resolvers need to request fresh answers more frequently.
For a record that rarely changes, this may create additional DNS traffic without offering much practical benefit.
For example, if an MX record has remained unchanged for years, there may be little reason to set its TTL to 60 seconds.
Low TTL values are most useful when you need flexibility. Stable records can usually use longer values.
When Should You Lower DNS TTL?
One of the best times to lower Time to Live is before a planned DNS change.
Suppose you are moving your website to a new server on Friday. Your current TTL is 24 hours.
If you reduce the TTL to five minutes only after changing the IP address, some resolvers may still have the old record cached for the original 24-hour period.
A better approach is to reduce the Time to Live in advance. This gives older cached records enough time to expire before the migration begins.
Lowering TTL beforehand can be useful for:
- Website migrations
- Server IP changes
- Mail server changes
- Cloud migrations
- DNS provider changes
- Planned failover
- Infrastructure maintenance
Once the change is complete and everything is working correctly, you can increase the TTL again if needed.
How DNS TTL Affects Website Performance
DNS caching can make domain lookups more efficient.
When a resolver already has a valid answer stored in cache, it does not need to contact the authoritative DNS server again for the same record.
A longer Time to Live can therefore reduce repeated DNS queries.
However, TTL is only one small part of website performance. Hosting quality, server response time, page size, caching, network latency and content delivery usually have a much bigger impact.
It is better to choose Time to Live based on how often the DNS record changes rather than trying to use it as a website speed trick.
DNS TTL and Failover
TTL can also play an important role in DNS failover.
Imagine a website uses a primary server and a backup server. If the primary server becomes unavailable, the DNS record may need to change so users are directed to the backup.
A shorter Time to Live can help resolvers discover the updated DNS information sooner.
Still, TTL does not create failover by itself.
A reliable failover setup also needs monitoring, backup infrastructure and properly configured DNS. TTL simply affects how long older DNS information may remain cached.
Do All DNS Records Have a TTL?
DNS records are associated with TTL values, including common record types such as A, AAAA, CNAME, MX, TXT, NS and SRV.
Suggest: Differences between A record and PTR record
How those values are configured depends on the DNS provider.
Some providers allow a separate TTL for each record. Others offer predefined values or automatic TTL settings.
There is also no rule saying every record must use the same TTL.
A frequently changing A record may need a shorter TTL, while a stable TXT or MX record may work perfectly well with a longer one.
Common DNS TTL Mistakes
One of the most common mistakes is reducing the TTL only after making a DNS change.
By that point, older versions of the record may already be cached using the previous TTL.
Another common mistake is expecting a five-minute TTL to mean that every user will see a change exactly five minutes later.
DNS caching can happen at different levels, and real-world behavior is not always identical across every resolver, operating system or application.
TTL should be seen as an important part of DNS caching, not as an exact global countdown.
How to Choose the Right DNS TTL
Choosing the right TTL does not have to be complicated.
Think about two things: how often the record changes and how quickly you may need to update it.
If a record almost never changes, a longer TTL may be a good choice. If you expect frequent updates or need faster failover, a shorter value may make more sense.
For many normal websites, one hour provides a useful balance. Before an important migration, you can temporarily reduce it and increase it again afterward.
Frequently Asked Questions About DNS TTL
Q1: What Does TTL Mean in DNS? – TTL stands for Time to Live. It tells DNS resolvers how long they can keep a DNS record in cache before requesting an updated version.
Q2: What Is a Good DNS TTL? – A TTL of 3600 seconds, or one hour, is commonly used for normal DNS records. The best value depends on how often the record changes and how quickly updates may be needed.
Q3: Is a Lower DNS TTL Better? – Not always. A lower TTL allows DNS information to refresh more often, but it also increases the number of DNS queries. Stable records may work better with a longer TTL.
Q4: Does TTL Affect DNS Propagation? – Yes. TTL controls how long older DNS information can remain cached, so it can affect how quickly resolvers request updated records after a change.
Q5: Should I Lower TTL Before Changing DNS Records? – Yes. If you are planning a major migration or infrastructure change, lowering the TTL in advance can help older cached records expire sooner.
Q6: What Happens When DNS TTL Expires? – Once the TTL expires, the cached DNS record is no longer considered fresh. The resolver can request a new version the next time the record is needed.
Q7: Can DNS TTL Be Too Low? – Yes. Very low TTL values cause DNS records to expire frequently, which increases the number of DNS queries and may offer little benefit for stable records.
Q8: Can DNS TTL Be Too High? – Yes. A very high TTL can make emergency or unexpected DNS changes slower because old information may remain cached for longer.
Conclusion
DNS TTL controls how long DNS records stay cached before they are refreshed.
Shorter TTLs are useful when fast changes matter, while longer TTLs are a better fit for stable records. The key is to choose a value that matches how your DNS is actually used.

Hi, I’m Bella, a technology enthusiast who enjoys making complex tech topics clear, practical, and easy to understand. Outside of writing, I love trail running, biking, traveling, and photography.