What Is TTL in DNS? Time To Live Explained

· Unified DNS Team · 8 min read

What Is TTL?

TTL (Time To Live) is a value in DNS records that specifies how long a record should be cached by DNS resolvers. It's measured in seconds and tells resolvers "you can keep using this cached answer for this many seconds before you need to check for updates."

The Basics

Example

example.com.    3600    IN    A    192.0.2.1
                 ↑
                TTL = 3600 seconds = 1 hour

This A record can be cached for up to 1 hour before resolvers should query the authoritative server again.

How TTL Works

The Caching Process

  1. DNS query received — Resolver receives query for example.com
  2. Cache checked — Is there a cached, non-expired response?
  3. If cache hit — Return cached response, decrement TTL
  4. If cache miss — Query authoritative nameserver
  5. Response received — Record with TTL (e.g., 3600 seconds)
  6. Response cached — Store with TTL countdown timer
  7. Timer counts down — 3600... 3599... 3598...
  8. Timer reaches zero — Cache entry expires, next query fetches fresh data

TTL Countdown

When a resolver caches a record, the TTL starts counting down:

Time ElapsedTTL Remaining
**Initial cache**3600 (1 hour)
**After 5 minutes**3300
**After 30 minutes**1800
**After 59 minutes**60
**After 1 hour**Cache expired - fetch new record

Cascade Effect

TTL affects every level of DNS caching:

Cache LevelBehavior
**Authoritative Server**Returns record with TTL 3600
**ISP Resolver**Caches for up to 3600 seconds
**Corporate DNS**Caches for up to remaining TTL
**User's Computer**Caches for up to remaining TTL
**Browser**May cache for shorter period

TTL Values Explained

Common TTL Values

TTL (seconds)Human ReadableUse Case
**60**1 minuteDuring active changes
**300**5 minutesMigration preparation
**600**10 minutesFrequently changing records
**1800**30 minutesModerate change frequency
**3600**1 hourStandard for most records
**7200**2 hoursStable records
**14400**4 hoursRarely changing records
**43200**12 hoursVery stable records
**86400**24 hoursMaximum recommended

The Trade-offs

Low TTL (60-300 seconds):

High TTL (3600-86400 seconds):

DNS Provider Minimums

Some DNS providers enforce minimum TTL values:

ProviderMinimum TTL
Cloudflare (Free)300 seconds (proxied)
Cloudflare (Pro+)60 seconds
AWS Route 530 seconds (no minimum)
GoDaddy600 seconds
Namecheap60 seconds
Azure DNS1 second

Choosing the Right TTL

By Record Stability

Stable records (rarely change):

; NS records - nameservers rarely change
example.com.    86400    IN    NS    ns1.provider.com.

; MX records - email routing is usually stable
example.com.    14400    IN    MX    10 mail.example.com.

Moderately stable (occasional changes):

; A records for production sites
www.example.com.    3600    IN    A    192.0.2.1

; TXT records for email authentication
example.com.    3600    IN    TXT    "v=spf1 include:_spf.google.com ~all"

Frequently changing:

; Development/staging environments
dev.example.com.    300    IN    A    192.0.2.50

; Load-balanced or failover services
api.example.com.    300    IN    A    192.0.2.100

By Scenario

Normal operation:

Before planned migration:

During active incident:

After migration:

TTL for Different Record Types

Recommended TTL by Record Type

Record TypeRecommended TTLRationale
**A / AAAA**3600Balance between caching and flexibility
**CNAME**3600Usually points to stable targets
**MX**3600-14400Email routing should be stable
**TXT (SPF/DKIM/DMARC)**3600Changes are planned, not urgent
**NS**86400Nameservers rarely change
**SOA**3600-86400Zone metadata, rarely queried
**SRV**3600Service discovery, moderate stability
**CAA**3600-86400Certificate policy, rarely changes
**PTR**3600-86400Reverse DNS, usually stable

Special Considerations

A records for web servers:

; Production - higher TTL for performance
www.example.com.    3600    IN    A    192.0.2.1

; Staging - lower TTL for flexibility
staging.example.com.    300    IN    A    192.0.2.50

CNAME records:

; CDN endpoint - moderate TTL (CDN handles failover)
cdn.example.com.    3600    IN    CNAME    example.cdn.cloudflare.net.

; Third-party service - match their recommendation
mail.example.com.    3600    IN    CNAME    sendgrid.net.

Email records:

; MX - stable, higher TTL is fine
example.com.    14400    IN    MX    10 mail.google.com.

; SPF - changes are planned
example.com.    3600    IN    TXT    "v=spf1 include:_spf.google.com ~all"

Changing TTL Values

Pre-Change Checklist

Before modifying TTL:

  1. Document current TTL — Know what you're changing from
  2. Understand the impact — Lower TTL means more queries
  3. Plan for old TTL expiration — Changes aren't instant
  4. Verify change propagated — Check multiple resolvers

The Two-Phase Approach

Phase 1: Lower TTL (prepare for change)

; Current state
example.com.    3600    IN    A    192.0.2.1

; Lower TTL 48 hours before migration
example.com.    300     IN    A    192.0.2.1

Wait 48+ hours for old TTL to expire everywhere.

Phase 2: Make the actual change

; Now change the IP (with low TTL, propagates quickly)
example.com.    300     IN    A    198.51.100.1

Phase 3: Restore normal TTL (after verification)

; After confirming change is successful
example.com.    3600    IN    A    198.51.100.1

How to Check Current TTL

Using dig:

# Query with +ttl flag to see remaining TTL
dig example.com A

# Look for the TTL value in the ANSWER section
;; ANSWER SECTION:
example.com.    2847    IN    A    192.0.2.1
                 ↑
            Remaining TTL (in seconds)

Query authoritative directly for original TTL:

# Find authoritative nameserver
dig NS example.com +short

# Query authoritative directly
dig @ns1.provider.com example.com A

Best Practices for MSPs

1. Standardize Default TTL

Establish a standard TTL for client domains:

2. Lower TTL Before Any Migration

Make this a standard procedure:

3. Document TTL in Client Records

In your documentation system:

4. Monitor for Inconsistent TTL

Watch for common problems:

5. Use Unified DNS for TTL Management

Managing TTL across multiple clients and providers is complex. Unified DNS provides:

6. Educate Clients on TTL

Help clients understand:

Frequently Asked Questions

What TTL should I use for most records?

3600 seconds (1 hour) is a good default for most records. It provides reasonable caching while allowing changes to propagate within a few hours.

Should I use the lowest possible TTL?

No. Very low TTLs (under 300 seconds) increase DNS query volume, potentially slowing resolution and increasing costs. Only use very low TTLs during active migrations or for genuinely dynamic records.

Why don't my changes appear immediately even with low TTL?

When you lower TTL, the old (higher) TTL is still cached by resolvers. You must wait for the old TTL to expire before the new low TTL takes effect. This is why you should lower TTL before making changes, not at the same time.

Do all DNS resolvers respect TTL?

Most do, but some resolvers have minimum TTL settings that override very low values. Some ISP resolvers are known to cache longer than specified. This is why "up to 48 hours" is often quoted for propagation.

What's the maximum TTL I should use?

86400 seconds (24 hours) is generally the maximum recommended. Longer TTLs provide diminishing returns and make emergency changes very slow to propagate.

Does TTL affect website performance?

Indirectly, yes. Higher TTL means more cache hits, which means faster DNS resolution. However, the difference is typically milliseconds and rarely noticeable to users.

Can I set different TTL for different records on the same domain?

Yes! Each record can have its own TTL. This is useful for having stable records (high TTL) alongside dynamic records (low TTL).

How does TTL interact with DNSSEC?

DNSSEC signatures have their own validity periods. When using DNSSEC, ensure signature validity periods are longer than the record TTL to prevent validation failures.


Get Started with Unified DNS

TTL management is critical for smooth DNS operations. Unified DNS lets you view, modify, audit, and backup all DNS records with their TTL values — making pre-migration TTL changes easy across multiple providers and clients.

Unified DNS is live — try it free for a month with code FREETRIAL2026 at billing setup. No commitment. Or request a demo for a walkthrough.