Table of Contents

DNS TTL (Time To Live)

TTL (Time To Live) is a value associated with every DNS record that specifies how long a recursive DNS resolver may cache the record before querying the authoritative DNS server again.

TTL is measured in seconds.


Why Does TTL Exist?

Without caching, every DNS query would require contacting the authoritative DNS server.

Caching reduces:

TTL tells recursive resolvers how long they may use a cached answer.


Example

Suppose the following record exists:

example.com.    3600    IN    A    93.184.216.34

Here:

A recursive resolver may cache this record for one hour.


How TTL Works

The first user requests:

example.com

The resolver:

Subsequent users receive the cached answer until the TTL expires.

User
   │
   ▼
Recursive Resolver
   │
(Cache)

TTL = 3600 s

When the TTL reaches zero, the resolver performs a new lookup.


Typical TTL Values

TTL Meaning Typical Usage
60 1 minute Testing or frequently changing records
300 5 minutes Dynamic services
900 15 minutes Moderate changes
3600 1 hour Common default
86400 24 hours Stable records

TTL and DNS Propagation

TTL directly affects DNS propagation.

Suppose:

Old Record:
93.184.216.34

TTL:
3600

If you change the IP address immediately after a resolver caches the old record, that resolver may continue serving the old address for up to:

3600 seconds

even though the authoritative server already contains the new record.


Lowering TTL Before DNS Changes

When planning a DNS migration:

  1. Lower the TTL several hours (or one day) before the change.
  2. Wait until the old TTL has expired.
  3. Change the DNS record.
  4. Increase the TTL again after propagation is complete.

Example:

Day 1

TTL = 86400

↓

Lower TTL to 300

↓

Wait 24 hours

↓

Change IP Address

↓

Most users update within 5 minutes

Does TTL Guarantee Propagation Time?

No.

TTL specifies the maximum recommended cache lifetime.

Some resolvers:

Therefore propagation time is usually close to—but not always exactly equal to—the TTL.


Common Misconceptions


Best Practices


Checking TTL

DNS lookup tools display the remaining TTL returned by the queried DNS server.

Example:

example.com

A Record:
93.184.216.34

TTL:
287

A remaining TTL of 287 seconds means the resolver will likely continue serving the cached record for another 287 seconds before querying the authoritative server again.


TTL and Telenegar DNS Check

Telenegar DNS Check displays the TTL returned by each DNS server.

Comparing TTL values from multiple resolvers can help identify:



dns ttl cache propagation resolver authoritative