DNS TTL Explained: What Time to Live Means and Best Values in Seconds

In DNS, Time to Live (TTL) is a numerical timer measured in seconds that tells recursive DNS resolvers how long to cache a record before requesting a fresh copy. Authoritative nameservers attach a TTL value (such as 3600 for 1 hour) to every DNS response. The length of a DNS TTL balances fast website lookup speeds against how quickly DNS changes take effect.

Record Published TTL = 3600s Resolver Caches for 1 hour you edit record You Edit Record new value + TTL Old Answer Served until cache expires TTL expires New Answer Served propagation complete raise TTL Back to Normal TTL 3600 the old TTL governs the window: lower it BEFORE the change, not after
The DNS cache lifecycle: local and recursive resolvers serve cached records until the TTL expires

How Does a DNS TTL Countdown Timer Work? (Authoritative vs Recursive Servers)

A DNS TTL timer works across 5 sequential caching steps where your authoritative nameserver serves a fixed starting number of seconds and recursive resolvers count that number down to zero.

The resolution and caching lifecycle progresses through these ordered stages:

  1. Configure a static TTL value in seconds (such as 3600) on a zone resource record.
  2. Return the record and full 3600-second TTL when a recursive resolver (like Cloudflare 1.1.1.1 or Google 8.8.8.8) queries the domain.
  3. Store the response in resolver RAM and decrement the countdown timer by 1 every second.
  4. Answer subsequent queries directly from cache using the remaining countdown value (for instance, returning 2400 twenty minutes later) without querying the authoritative server.
  5. Discard the cached record once the countdown reaches 0 and query your authoritative nameserver again on the next request.

Querying your authoritative nameserver always returns the full configured TTL (such as 3600), whereas querying a public recursive resolver returns a ticking countdown number. Caching hops are explored in How DNS Works, and live resolver values can be audited via the DNS TTL Checker.

Common DNS TTL Values in Seconds (Conversion Chart and Use Cases)

DNS zone files and control panels always express TTL values in raw seconds rather than minutes or hours (for example, 300 equals 5 minutes and 86400 equals 24 hours). The table below converts the 8 standard DNS TTL values from seconds into human time and defines when to use each setting.

TTL Value (Seconds)Equivalent TimeCategoryPrimary Use Case
601 minuteUltra-LowActive automated DNS failover, multi-CDN traffic steering, and live cutover testing.
3005 minutesLow (Pre-Migration)Standard pre-migration setting lowered 24 to 48 hours before changing an IP or mail host.
180030 minutesModerateFrequently updated web applications, staging subdomains, and dynamic API endpoints.
36001 hourStandard DefaultRecommended everyday balance for production A, AAAA, CNAME, and TXT records.
144004 hoursMedium-HighStable corporate websites and verified SPF or DMARC records that rarely change.
4320012 hoursHighLong-standing MX mail routing records and DKIM public key records.
8640024 hours (1 day)Maximum StandardStatic NS delegations, CAA records, and infrastructure that never changes IP addresses.
17280048 hours (2 days)Registry Parent DefaultFixed TTL used by TLD registries (.com, .net) for parent NS and glue records.

Public recursive resolvers cap maximum cache lifetimes between 1 and 7 days (86400 to 604800 seconds) regardless of larger values in zone files. Consumer ISP resolvers often enforce a minimum cache floor between 60 and 3600 seconds, ignoring ultra-short timers like 0 or 5 seconds to save bandwidth.

What Are the Best TTL Values for Each DNS Record Type? (A, CNAME, MX, TXT, NS)

Different DNS record types require different TTL settings based on how frequently their target values change and how critical they are to uptime. The table below lists the recommended production TTL and pre-migration TTL for the 7 primary DNS record types.

Record TypeNormal Production TTLPre-Migration TTLWhy This TTL Range Works Best
A and AAAA300 to 3600 s (5m - 1h)60 to 300 sWeb server IPs change during migrations, scaling, or failover; shorter TTLs accelerate traffic switching.
CNAME1800 to 3600 s (30m - 1h)300 sAlias targets rarely change, and the underlying canonical A record manages its own IP caching lifecycle.
MX3600 to 43200 s (1h - 12h)300 sMail server hosts change infrequently; higher TTLs preserve stable mail routing across SMTP relays.
TXT (SPF, DMARC)1800 to 3600 s (30m - 1h)300 sA 1-hour TTL permits rapid recovery if a new third-party email sending service requires policy inclusion.
TXT (DKIM Keys)3600 to 86400 s (1h - 24h)300 sPublic cryptographic keys remain static until scheduled rotation, making long caching safe and efficient.
CAA3600 to 86400 s (1h - 24h)300 sCertificate Authority authorizations change only when switching SSL vendors, justifying longer TTLs.
NS86400 s (24h)3600 sNameserver delegations remain static for years; parent TLD registries enforce 48 hours regardless of child values.

Dynamic routing designs like active-passive server failover depend directly on short 60-second TTLs to reroute traffic within seconds, as detailed in DNS Load Balancing and the core protocol breakdown in What Is DNS.

High TTL vs Low TTL: What Are the Performance, Cost, and Security Trade-Offs?

Choosing between a high TTL (14400 to 86400 seconds) and a low TTL (60 to 300 seconds) involves 4 operational trade-offs across page-load latency, authoritative query costs, DDoS resilience, and migration agility.

System administrators balance these 4 architectural considerations:

  1. Visitor Resolution Latency: A High TTL keeps records cached at local ISP resolvers, returning warm responses in 1 to 15 ms. A Low TTL forces resolvers to re-query authoritative nameservers, adding 40 to 150 ms on cache misses.
  2. Authoritative Query Volume and Costs: Managed DNS providers bill per million queries. Dropping your TTL from 3600 seconds to 60 seconds multiplies query volume and monthly DNS invoices by 10x to 30x.
  3. DDoS Outage Resilience: A High TTL buffers websites against upstream DNS outages because resolvers serve cached answers for hours. A 60-second TTL causes domains to go dark globally within one minute if nameservers become unreachable.
  4. Migration and Rollback Agility: A Low TTL (300 seconds) allows teams to cut over to new hosting infrastructure or revert broken deployments in 5 minutes rather than waiting 24 hours.

The proven operational strategy relies on running a standard 3600-second (1-hour) TTL during normal periods, lowering it to 300 seconds 24 to 48 hours prior to maintenance, and restoring the 1-hour setting once verified. Planning cutovers is detailed in How to Change DNS Records Without Downtime and DNS Propagation.

How Does SOA Negative Cache TTL Work for Non-Existent Domains (NXDOMAIN)?

Caching for non-existent domain names (NXDOMAIN) is governed under RFC 2308 Section 3 by the smaller of the MINIMUM negative cache timer at the end of your domain's Start of Authority (SOA) record and the SOA record's own TTL (min(SOA TTL, SOA.MINIMUM)) rather than a standard resource record TTL. Many administrators mistakenly confuse the SOA record's Expire and Minimum Negative Cache fields with their main record TTL, whereas positive caching always uses each individual record's own TTL value.

Authoritative zone files format SOA timers according to this structure:

example.com. 3600 IN SOA ns1.example.com. admin.example.com. (
    2026102901 ; Serial number
    7200       ; Refresh (2 hours)
    3600       ; Retry (1 hour)
    1209600    ; Expire (14 days)
    3600       ; Negative Cache TTL / MINIMUM (1 hour)
)

Querying a non-existent subdomain (such as staging.example.com) before creating its DNS record causes recursive resolvers to cache the negative NXDOMAIN response according to RFC 2308 specifications. Creating the record minutes later will not make it resolve immediately on that device until the negative cache timer expires or the user flushes their system cache using How to Flush DNS Cache. Full timer parameters are documented in SOA Record and SOA Record Lookup.

What Is the Difference Between DNS TTL, IP Packet TTL, and CDN Cache TTL?

The acronym TTL appears in 3 separate networking contexts: DNS Record TTL (measured in seconds), IP Packet TTL (measured in router hops), and HTTP/CDN Cache TTL (measured in seconds), each operating at distinct protocol layers.

Network engineers distinguish these 3 implementations:

  1. DNS Record TTL (Seconds): Stored inside resource records to instruct recursive resolvers how long to cache IP mappings before re-querying authoritative servers.
  2. IP Packet TTL / Hop Limit (Router Hops, 1 to 255): An 8-bit field in IPv4 headers (Hop Limit in IPv6) decremented at every routing hop to prevent infinite network loops. Reaching a hop counter value of zero causes the handling router to discard the packet and return an ICMP Time Exceeded (Type 11) message, forming the foundational mechanism utilized by traceroute diagnostics. The ttl=56 metric in ping reflects remaining router hops rather than DNS caching timers.
  3. CDN and HTTP Cache-Control TTL (Seconds): Transmitted in HTTP headers (such as Cache-Control: max-age=86400) directing browsers and Anycast CDN edges how long to store static files.

Inspecting a domain live TTL countdown is straightforward using terminal commands like dig +noall +answer example.com A @1.1.1.1, where the second column outputs the remaining seconds before cache expiration. Monitoring your domain DNS TTL values, maintaining a balanced 300 to 86400 seconds caching schedule, and executing timely pre-migration adjustments ensures authoritative nameservers and recursive resolver caches deliver optimal performance. Webmasters can audit multi-resolver caching via the DNS TTL Checker and monitor global record propagation through the DNS Propagation Checker.

Frequently asked questions

Is DNS TTL measured in seconds or minutes?+

DNS TTL is always measured and stored in seconds inside DNS zone files. For example, a 5-minute TTL is written as 300, a 1-hour TTL is 3600, and a 24-hour TTL is 86400, even if your DNS provider's web dashboard displays a dropdown in minutes or hours.

What does "Auto" TTL mean in Cloudflare?+

In Cloudflare DNS, setting a record's TTL to Auto assigns a default TTL of 300 seconds (5 minutes) for unproxied (DNS-only) records. For proxied (Orange Cloud) records, Cloudflare automatically manages edge caching and serves a short 300-second TTL to external resolvers. Cloudflare provides a minimum custom TTL of 60 seconds on standard plans and 30 seconds on Enterprise plans.

Does lowering my DNS TTL clear caches that already have the old record?+

No, lowering a record's TTL only applies to new lookups fetched after you save the change. Any recursive resolver that cached your record earlier continues counting down the previous TTL timer until it expires naturally. In real-world migration planning, we recommend lowering record TTLs to 300 seconds at least 24 to 48 hours in advance so cached entries expire before server cutovers.

What is a good default TTL for A and MX records?+

A TTL of 3600 seconds (1 hour) is the ideal everyday default for production A and AAAA web records, balancing fast cached lookups with 1-hour recovery if an IP changes. For stable MX mail records, 3600 to 14400 seconds (1 to 4 hours) is standard. In practice, the most common mistake administrators make is setting TTLs to days or weeks on frequently changing records, causing protracted outages when server IP addresses migrate.

Last verified: 2026-11-05