The Role of DNS TTL (Time to Live) Settings

The Role of DNS TTL (Time to Live) Settings

SEO guide explaining the role of dns ttl (time to live) settings. Learn the best practices, setups, and automation tricks.

Technology TLDix Editorial Team Published: Updated: 5 min read

Every DNS answer comes with a number attached: the Time to Live, or TTL. It is easy to overlook because DNS panels fill in a default and most people never touch it. Yet that one value decides how quickly a change to your website, email or API reaches users, how much load your nameservers handle and how gracefully your domain survives a provider outage. Understanding TTL is the difference between a migration that finishes in five minutes and one that drags on for a day.

This guide explains what TTL actually does, how to choose sensible values, how to plan a migration around it, and why real-world caches do not always follow the number you set.

⚡ TLDix Instant Tools

Inspect Any Domain and Web Hosting Instantly

Inspect the infrastructure of any domain or website in seconds using TLDix WHOIS Domain, Hosting Lookup and Domain Oracle (AI).

🔍 Domain WHOIS 🖥️ Hosting Lookup 🔮 Domain Oracle ✨ Sign Up Free →

What TTL means in DNS

TTL is a field on every resource record, measured in seconds. When a recursive resolver, such as your ISP’s resolver or a public one like 1.1.1.1 or 8.8.8.8, fetches a record from an authoritative nameserver, it stores the answer and counts the TTL down. Until it reaches zero, the resolver answers from its cache without asking the authoritative server again. When it expires, the next query triggers a fresh lookup.

You can see the countdown with dig. Run the same query twice against a resolver and the TTL in the answer section will be lower the second time:

dig @8.8.8.8 example.com A +noall +answer
example.com.    2873    IN    A    93.184.215.14

To see the original value set by the zone owner, ask an authoritative nameserver directly:

dig NS example.com +short
dig @ns1.example-dns.net example.com A +noall +answer

The often quoted idea of “DNS propagation” is really this: thousands of independent caches each expiring the old answer on their own schedule. Nothing is pushed out; caches simply forget.

The trade-offs of short and long TTLs

No TTL is right for every record. Each choice balances agility against efficiency and resilience.

TTLAdvantagesDrawbacksTypical use
60–300 sChanges take effect quickly; good for failoverMore queries, slightly slower first lookups, more exposure if nameservers failLoad-balanced or failover endpoints, records about to change
3600 s (1 hour)Balanced defaultChanges take up to an hour to reach most usersMost A, AAAA and CNAME records
14400–86400 sFewer queries, cached answers survive short outagesMistakes linger for hoursMX, TXT for SPF or verification, stable records
86400–172800 sVery stableSlow to change; usually set by the registryNS records and glue at the parent zone

A long TTL also acts as a safety net. If your authoritative DNS provider goes down, resolvers that cached your records an hour ago keep answering for the rest of that hour. With a 60-second TTL, users feel an outage almost immediately. Short TTLs are not free performance either: each cache miss adds a round trip to the authoritative servers.

Choosing values for each record type

A, AAAA and CNAME

For a website on a stable server, one hour is a sensible baseline. If you use a CDN or a managed load balancer, follow the provider’s guidance; many use short TTLs on their own records so they can steer traffic, and your CNAME to them can stay longer.

MX and mail-related TXT

Mail routing rarely changes, and senders retry for days if delivery fails, so a few hours to a day is fine. Lower it in advance if you are moving to a new email provider.

NS records

The NS records that really matter for delegation sit in the parent zone and are controlled by the registry, often with a TTL of one or two days. That is why changing nameservers at your registrar takes longer than changing an A record. You can check which nameservers a domain currently delegates to with the TLDix WHOIS lookup.

SOA

The SOA record carries timers for secondary servers and the negative-caching value discussed below. Its own TTL is usually an hour or more.

Lowering TTL before a migration

The most useful practical TTL technique is to shrink it before a planned change. The key detail people miss is timing: resolvers only learn about your new, lower TTL after their cached copy with the old TTL expires.

  1. Check the current TTL on the authoritative server. Say it is 86400 seconds.
  2. Lower it to 300 seconds at least 24 hours, one full old TTL, before the migration. Waiting a little longer is safer.
  3. Make the change, for example point the A record at the new server. Most caches now refresh within five minutes.
  4. Keep the old server running for a while, because some clients will lag behind.
  5. Raise the TTL back to its normal value once traffic and logs confirm the move is complete.
; 24+ hours before
www.example.com.   300    IN  A  203.0.113.10
; migration moment
www.example.com.   300    IN  A  198.51.100.20
; after verification
www.example.com.   3600   IN  A  198.51.100.20

If you skip step 2 and change the record while the TTL is still a day, some users will reach the old server for up to a day.

Negative caching and the SOA minimum

Resolvers also cache the absence of a record. When a name does not exist (NXDOMAIN) or exists without the requested type (NODATA), RFC 2308 says the resolver may cache that negative answer. Its lifetime is the lower of the SOA record’s own TTL and the last field in the SOA, historically called “minimum”.

dig example.com SOA +noall +answer
example.com. 3600 IN SOA ns1.example-dns.net. hostmaster.example.com. 2026100701 7200 3600 1209600 3600

Here the final 3600 means a failed lookup can be remembered for an hour. This bites when you query a new subdomain before creating it: a monitoring check, a certificate validation attempt or an impatient test caches NXDOMAIN, and the new record then seems “not to propagate”. To avoid this, create records before anything looks them up, and keep the SOA negative TTL modest, typically 300 to 3600 seconds.

When resolvers clamp or ignore your TTL

The TTL you publish is a maximum, not a guarantee. Several layers may change it:

  • Resolver limits. Software such as BIND and Unbound has configurable maximum cache times, and operators may set minimums so very short TTLs are raised. BIND’s default maximum is one week, and its negative cache is capped at three hours by default.
  • Serve-stale. RFC 8767 lets resolvers keep answering with expired data when authoritative servers are unreachable. This improves resilience but can extend the life of old answers.
  • Operating systems and browsers. Local stub resolvers and browsers keep their own short caches, independent of the network resolver.
  • Applications. Long-running processes may resolve a name once and reuse the address, and some runtimes have their own DNS cache settings.

The upshot: plan for a long tail. After any change, expect most traffic to move within the TTL and a small fraction to straggle for longer.

Monitoring and good habits

  • Document the normal TTL for each record so temporary reductions are not forgotten.
  • Compare authoritative answers with several public resolvers after changes.
  • Avoid TTLs below 30 seconds unless your provider specifically needs them.
  • Pair DNS changes with expiry tracking for the domain, certificates and hosting, since an expired domain breaks DNS regardless of TTL.

For a refresher on what each record type does, read our guide to DNS records basics.

Frequently asked questions

What is a good default TTL for a small business website?
One hour, 3600 seconds, is a reasonable default for A, AAAA and CNAME records on a stable host. It keeps query volume low while letting changes reach most users within an hour. Use longer values for MX and TXT records that rarely change, and lower the TTL temporarily only when a change is planned.
Can I force everyone to see my DNS change immediately?
No. Once a resolver has cached an answer, it will normally keep it until the TTL expires, and nothing on your side can recall it. You can flush caches you control, such as your own computer or a public resolver’s purge tool, but other users will update on their own schedule. Lowering TTL in advance is the only reliable approach.
Why did my new subdomain take longer to appear than its TTL?
Usually because of negative caching. If anything looked up the name before you created it, a resolver cached the NXDOMAIN answer for as long as the SOA negative TTL allows. Until that cached failure expires, the resolver keeps saying the name does not exist, even though the new record has a short TTL.
Does a low TTL hurt SEO or site speed?
Search engines do not rank sites on TTL. A very low TTL can add a small delay to some first visits, because resolvers must contact your nameservers more often, and it increases query volume. For most sites the effect is minor, but there is little benefit in keeping TTLs at 60 seconds permanently without a failover need.
Is there a maximum TTL value?
RFC 2181 limits TTLs to 2147483647 seconds, but no practical setup needs anything close to that. Many resolvers cap cached records at a day or a week regardless of what you publish. Values above two days rarely bring a real benefit and make mistakes very slow to correct, so most zones stay at or below 86400 seconds.
Frequently Asked Questions

Everything You Need to Know

Find answers about domain lookups, WHOIS, pricing, and AI Domain Oracle on TLDix.com.