Free auditStart free
GlossaryGlossary · Performance

TTL (time to live)

TTL on a DNS record sets how long resolvers may cache it. Cloudflare's limits, the speed versus change trade-off, how it differs from max-age, and a dig check.

3 min
read
3
sources
Oct 31, 2026
updated
Scaplet Editorial Team
author
In one line

TTL (time to live) on a DNS record is the number of seconds resolvers may cache that record before asking again. A longer TTL means faster repeat lookups but slower propagation of changes, and a shorter TTL does the opposite. HTTP caching has its own lifetime, Cache-Control max-age, which is a different setting.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
Seconds
Unit
Each DNS record
Applies to
300 seconds
Cloudflare Auto
60 seconds to 1 day (30 seconds on Enterprise)
Cloudflare DNS-only range
02Cloudflare DNS limits

Choosing a value

Cloudflare's documentation frames the trade-off directly: a longer TTL makes lookups faster because more are answered from cache, and also means record updates take longer to take effect. A shorter TTL speeds updates at the cost of more uncached lookups. Cloudflare adds that local caches can take longer than the TTL to update, so the real delay can exceed the number you set.
Record type

Proxied

TTL behavior
Fixed at Auto, which is 300 seconds, and cannot be changed
Record type

DNS only, Auto

TTL behavior
300 seconds
Record type

DNS only, custom

TTL behavior
60 seconds to 1 day (86,400 seconds). 30 seconds minimum on Enterprise
Use a longer TTL when
  • The record is stable and rarely changes
  • You want more lookups answered from resolver caches
  • You are not planning a move soon
Use a shorter TTL when
  • You are about to change an IP, host or provider
  • You want changes to reach users sooner
  • You accept more uncached lookups in return
04Worth knowing

Check it in 2 minutes

Read the TTL on the authoritative answer

Query your nameserver directly to see the configured value rather than a decremented cached one.

Re-check after the change

Query a public resolver to see whether it already returns the new value.

Do not confuse it with a redirect

A DNS change does not send a 301. See 301 redirect for moving URLs.

Read the TTL a resolver reports
# The number after the name is the remaining TTL in seconds
dig +noall +answer www.example.com A
# www.example.com.  287  IN  A  203.0.113.10

# Ask again after a few seconds: a cached answer counts down
dig +noall +answer www.example.com A @1.1.1.1
Sources · 3

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • rfc-editor.org
  • cloudflare.com
  • mozilla.org
  1. 01RFC 1035: Domain names, implementation and specificationrfc-editor.org · checked 2026-11-01
  2. 02Time to live (TTL) (Cloudflare DNS docs)developers.cloudflare.com · checked 2026-11-01
  3. 03Cache-Control header (MDN)developer.mozilla.org · checked 2026-11-01
Questions

Asked a lot.

2 questions people ask next, answered from the sources on this page.

01What is a good TTL for DNS?

There is no single value. Cloudflare's Auto setting is 300 seconds, and DNS-only records can be set from 60 seconds to 1 day. Pick shorter when you expect changes and longer for stable records.

02Is TTL the same as Cache-Control max-age?

No. DNS TTL caches a DNS record at resolvers. max-age sets how long an HTTP response stays fresh in browser and CDN caches. Both are in seconds but control different caches.

Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly