Understanding TTL (Time to Live)

Updated 25 February 2026 11 views DNS & Nameservers

What Is TTL in DNS?

TTL (Time to Live) is a value in a DNS record that tells DNS resolvers how long to cache that record before requesting a fresh copy from the authoritative nameserver. TTL is measured in seconds.

How TTL Works

When a DNS resolver looks up a record for the first time, it stores (caches) the result for the duration specified by the TTL. During this period, subsequent queries for the same record are answered from the cache without contacting the authoritative server. Once the TTL expires, the resolver fetches a fresh copy.

Common TTL Values

  • 300 (5 minutes) – Very short. Useful when you plan to make DNS changes soon.
  • 3600 (1 hour) – A good default for most records.
  • 14400 (4 hours) – Common default on many hosting platforms.
  • 86400 (24 hours) – Suitable for records that rarely change.

When to Use a Low TTL

  • Before a migration: Lower the TTL to 300 seconds at least 24 to 48 hours before changing servers so that the old high TTL expires across all caches.
  • During active changes: Keep TTL low while you are making and testing DNS changes.
  • Failover setups: Low TTLs allow faster switching to backup servers if the primary goes down.

When to Use a High TTL

  • Stable records: If your IP address and DNS records rarely change, a higher TTL reduces the number of DNS queries and speeds up resolution for visitors.
  • After migration: Once your DNS changes have propagated and everything is working, increase the TTL to 3600 or higher.

How to Change TTL

  1. In your DNS management panel (DirectAdmin or Cloudflare), edit the DNS record.
  2. Locate the TTL field.
  3. Enter the desired value in seconds.
  4. Save the record.

Important Note

Changing a TTL does not take effect immediately for records already cached worldwide. The old TTL must expire first. This is why you should lower the TTL well in advance of any planned DNS changes.

In Cloudflare, proxied records (orange cloud) have their TTL set to Auto and cannot be manually adjusted, as Cloudflare manages caching for proxied traffic.

Was this article helpful?

Let us know so we can improve our docs.