A TTL (time to live) in DNS is the number of seconds a DNS record may be cached by resolvers before they must ask the domain's authoritative nameserver again. RFC 1035 defines it as the time interval a resource record may be cached before the source should be consulted again. Short TTLs make changes propagate fast; long TTLs make lookups faster and reduce load on your nameservers.
Key takeaways
- A DNS TTL is a countdown in seconds that tells resolvers how long they may cache a record before asking again.
- TTL is a maximum, not a promise: resolvers may drop a record sooner, and some enforce their own minimums and caps.
- Lower the TTL before a planned change, then raise it again after — that is how you make DNS moves fast and safe.
Change your website's IP address and nothing happens — for a while. Then, slowly, the new address reaches the world. The delay is not random. It is controlled by one small number on every DNS record: the TTL.
What is a TTL in DNS?
A TTL, or time to live, is a field on every DNS record that says how long the record may be cached, measured in seconds. RFC 1035, the original DNS standard from 1987, defines it as the time interval that a resource record may be cached before the source of the information should again be consulted.
In plain terms: when a resolver looks up your domain, your nameserver answers with the record and a TTL. The resolver stores that answer and reuses it until the TTL runs out. Only then does it ask again. A TTL of 300 means five minutes; 3600 means one hour; 86400 means one day.
Every record type carries its own TTL — A, AAAA, CNAME, MX, TXT, NS and the rest. You set it per record at your DNS provider, and each record can have a different value.
How does DNS TTL work?
DNS TTL works like a countdown on a cached answer. When a resolver first asks for your domain, it gets the answer plus the TTL, stores both, and starts the clock. Each later query is answered from the cache while the clock runs.
Here is the sequence for a lookup of www.example.com:
- First query: your browser asks its resolver, which has no cached copy. The resolver asks the authoritative nameserver and gets the A record with a TTL of 3600.
- Cached queries: for the next hour, anyone using that resolver gets the cached answer instantly — no trip to your nameserver.
- Expiry: after 3600 seconds the cached copy is discarded. The next query goes back to your nameserver and gets the current answer, with a fresh TTL.
- Change: if you changed the record during that hour, the old answer keeps being served until the TTL expires. That is why DNS changes feel slow.
Two details matter. First, the TTL you see in a reply counts down: query the same record twice, 20 seconds apart, and the second answer shows a TTL 20 seconds lower.
Second, the TTL is a maximum, not a promise. RFC 2181 states it plainly: the TTL specifies a maximum time to live, not a mandatory time to live. Resolvers may drop a record sooner, and some enforce their own minimums — Google Public DNS, for example, enforces a floor of 30 seconds.
What are common TTL values?
Common TTL values run from 60 seconds to one day, and the right value depends on how often the record changes. There is no single correct TTL — only a trade-off between fast updates and fast lookups.
| TTL (seconds) | Human time | Typical use |
|---|---|---|
| 60 | 1 minute | Failover, load balancing, records you expect to change at short notice |
| 300 | 5 minutes | Cloudflare's Auto default; a safe default for most A and CNAME records |
| 1800 | 30 minutes | Records that change occasionally, such as a staging environment |
| 3600 | 1 hour | The most common default at many registrars; stable websites and MX records |
| 14400 | 4 hours | Stable records on a domain that rarely changes |
| 86400 | 1 day | NS records, TXT records for email authentication, very stable records |
| 172800 | 48 hours | TLD delegations in the parent zone; you cannot set this yourself |
Provider defaults differ. Cloudflare sets proxied records to Auto, which is 300 seconds and cannot be changed, and lets DNS-only records range from 60 seconds to one day. Other providers default to 1800 or 3600 seconds. Check your provider's default before you assume anything.
One special case: the SOA record at the top of your zone carries a minimum TTL that controls negative caching — how long resolvers remember that a name does not exist. A high SOA minimum means a typo in a new record can keep failing long after you fix it.
How does TTL affect DNS propagation?
TTL is the main thing that decides how long a DNS change takes to reach everyone. A changed record becomes visible everywhere once the old copy's TTL has run out, so the wait is at most the TTL the record carried before you changed it.
That "before you changed it" is the part people miss. If your A record had a TTL of 86400 and you change the IP, some resolvers will serve the old address for up to a full day — even though the new record you just saved has a TTL of 300. The new TTL only governs the new answer; the old answer lives under the old TTL.
The fix is to plan ahead. Lower the TTL to 300 a day or two before a planned move, wait for the old TTL to expire, then make the change. After the move works, raise the TTL back up. This is the standard playbook for a website migration, a server move, or a mail provider switch, and it turns a day of uncertainty into five minutes.
A nameserver change is slower than a record change. The parent zone publishes your delegation with a TTL of 172800 seconds, so a resolver that cached the old nameservers can hold them for up to 48 hours. That is why changing DNS providers feels slower than changing an IP address.
What TTL should I use?
Use a short TTL where you need agility and a long TTL where you need stability. Most domains end up with a mix, and that is fine — TTL is set per record, not per domain.
- 300 seconds for A and AAAA records on a site you might move, and for records behind failover or a load balancer.
- 3600 seconds for a stable website, your MX records, and CNAMEs that rarely change.
- 86400 seconds for NS records and for TXT records used by email authentication, such as SPF, DKIM and DMARC. These change rarely, and a long TTL means fewer queries. Our guide to what DMARC is explains why those records matter.
- 60 seconds only during an active migration or an incident, and only for the records involved. Raise it again once things settle.
Do not set everything to 60 seconds "just in case". Very low TTLs mean resolvers query your nameserver constantly, which adds latency to first lookups and load to your DNS provider. It also makes you more exposed if your nameserver has a brief outage, because nothing is cached to fall back on.
How do I check a DNS TTL?
You can check any record's TTL in seconds with the dig command, which is built into macOS and Linux and available on Windows through WSL. The number in the answer section is the remaining TTL.
dig example.com A
dig example.com MX
dig @8.8.8.8 example.com TXT
Run the same query twice, a few seconds apart, and watch the TTL drop — that tells you the answer is coming from a cache. Run it against your authoritative nameserver directly to see the full TTL as published, rather than the remaining time on a cached copy.
If you do not want to use the command line, our free DNS lookup tool shows your records and their TTLs in the browser.
The WHOIS lookup shows your nameservers and registration details.
Cysoro's DNS and domain security checks also flag missing or misconfigured records that a bad TTL can make worse.
What happens if TTL is 0?
A TTL of 0 means the record should be used only for the transaction in progress and not cached at all, according to RFC 1035. Every lookup would go back to your nameserver.
In practice, a TTL of 0 does not guarantee instant updates. Some resolvers enforce a minimum TTL — Google Public DNS treats anything below 30 seconds as 30 seconds — and some may briefly reuse an expired copy if your nameserver cannot be reached.
So a TTL of 0 is useful for testing, but do not rely on it for an emergency change. The reliable way to make a change fast is to lower the TTL in advance, as described above.
At the other extreme, RFC 2181 caps the TTL field at 2,147,483,647 seconds, about 68 years. Nobody publishes TTLs anywhere near that long, and RFC 8767 later recommended that resolvers cap stored TTLs at 604,800 seconds, or seven days. In practice, the longest TTL you will meet is a day or two.
What are the common TTL mistakes?
Most TTL problems come from the same few errors. They are easy to avoid once you know them.
- Changing the record without lowering the TTL first. The old answer lives on for the old TTL. Lower it a day or two ahead of any planned change.
- Setting every TTL to 60 seconds. It feels safe, but it adds latency and load, and it removes the cushion that caching gives you during a nameserver outage.
- Forgetting the SOA minimum. A high SOA minimum means a failed lookup for a name that does not exist yet is cached for hours, which confuses testing of new records.
- Expecting a proxied Cloudflare record to use your TTL. Cloudflare sets proxied records to Auto (300 seconds) and you cannot edit it. Only DNS-only records use your value.
- Assuming propagation is instant after a low TTL. Local caches on laptops, routers and browsers have their own timers. Flushing your local cache helps you, but not your visitors.
One more subtlety: all records in a resource record set must share the same TTL. RFC 2181 deprecates differing TTLs within a set, and a resolver that receives one should treat the whole set as having the lowest TTL in it. Your DNS provider normally enforces this for you.
TTL vs DNS propagation: what's the difference?
TTL is a setting; propagation is the effect you observe. People say a change "has propagated" when resolvers everywhere return the new answer, but DNS has no mechanism to announce a change to the world. Your DNS host updates its authoritative servers, and that is the only place the new data goes.
Every recursive resolver that already holds the old answer keeps serving it until its copy expires, then asks again and gets the new one. So "propagation time" is really "the longest TTL any resolver cached before your change". That is why two people can see different answers for the same domain at the same moment — one resolver's copy expired, the other's did not.
Tools that check propagation from many locations are useful, but they only show the resolvers they test. The only number that controls the wait is the TTL, which is why the planning step matters more than the checking step.
Keep your network healthy too: a weak home network makes DNS look slow when the real problem is Wi-Fi, so our guide to securing your Wi-Fi is worth a read if lookups feel slow at home.
The bottom line
A DNS TTL is a simple number with a big effect: it decides how long the internet remembers your answer. Short TTLs give you fast changes at the cost of more lookups; long TTLs give you fast lookups at the cost of slow changes.
For most domains, 300 seconds for records that may move and 3600 seconds for stable ones is the right balance — and always lower the TTL before a planned change, not during it. You can check your own records and their TTLs right now with the free DNS lookup tool.
Frequently asked questions
What is a TTL in DNS in simple terms?
A TTL is a countdown timer on a DNS record, measured in seconds. It tells internet resolvers how long they can keep a copy of your record before they have to ask your nameserver for a fresh one. A TTL of 3600 means the record can be cached for one hour.
What is a good TTL for DNS records?
For stable records like a website's A record, 3600 seconds (one hour) to 86400 seconds (one day) is typical. For records that change often, such as failover or load-balanced addresses, 300 seconds (five minutes) is common. Use a short TTL only when you actually need fast changes.
How long does DNS propagation take after changing a TTL?
A change to a record is visible everywhere once the old copy's TTL expires, so the wait is at most the TTL the record had before you changed it. A TTL of 300 means five minutes; a TTL of 86400 means up to a day. A nameserver change is slower, because parent zones publish delegations with a TTL of 172800 seconds, or 48 hours.
Can I set a TTL of 0?
Yes. A TTL of 0 means the record should be used only for the transaction in progress and not cached at all. In practice, some resolvers treat very low TTLs as a minimum, and Google Public DNS enforces a floor of 30 seconds, so a TTL of 0 does not guarantee instant updates everywhere.
What is the difference between TTL and DNS propagation?
TTL is the setting that controls caching; propagation is the observed effect of that setting. There is no single moment when a change propagates everywhere — each resolver picks up the new answer when its cached copy expires, which is governed by the TTL.
What is negative caching in DNS?
Negative caching is when a resolver remembers that a name does not exist, so it does not keep asking. The SOA record's minimum field sets how long that negative answer is cached. This is why a typo in a new record can keep failing for a while even after you fix it.
Does a low TTL slow down my website?
Slightly. With a very low TTL, resolvers ask your nameserver more often, which adds a small delay to the first lookup for each visitor. For most sites the effect is tiny, but a TTL of 300 seconds on a busy domain means far more queries than a TTL of 86400.
How do I check the TTL of a DNS record?
Run dig with the record type, for example dig example.com A. The number in the answer section is the remaining TTL in seconds. It counts down as the cached copy ages, so run it twice a few seconds apart and you will see the number drop.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against RFC 1035, RFC 2181 and Cloudflare's TTL documentation, with resolver behavior from Google's Public DNS FAQ.
How we write and fact-check →