Beamfar

What is TTL (time to live) in DNS?

TTL, short for time to live, is a number attached to every DNS record. It is the time in seconds that a resolver may keep the answer in its cache before it must ask again. RFC 1035 defines the field, and RFC 2181 limits its value to between 0 and 2,147,483,647 and describes it as a maximum, not a mandatory time.

Definition
TTL
The number of seconds a resolver may keep a DNS answer before asking again, which sets how slowly a DNS change spreads.

Why it matters

When you change a record, resolvers that already hold the old answer keep using it until its TTL runs out. With a TTL of 3,600 the change reaches everyone within about an hour; with 86,400, within a day. A resolver may also apply its own cap. That is why a change can look correct from your device and be wrong for the client, and why a mistake can appear up to a TTL after it was made.

Working with it

Lower the TTL (to 300 seconds, for instance) a day or more before a planned change, wait at least the old TTL, make the change, verify, and raise it again afterwards. Very low TTLs permanently increase query volume and reliance on the DNS provider.

How to see it

dig www.example.com A prints the TTL in the answer section, the number before IN, for example 300. Ask the same recursive resolver again a minute later and the number is smaller, because the cached copy ages. Ask the authoritative nameserver directly (dig @ns1.example.net www.example.com A) and you see the full value. Both numbers matter when you plan a change: the first tells how long old answers can survive, the second what you set.

What to check

The TTL of the records you are about to change, and the answer from the authoritative nameserver, not only from a cache.

Sources

Read on . Standards and vendor pages change; confirm the current text before you rely on it.

Guides that use this term

  • DNS recordA DNS record is one entry in a domain’s zone that maps a name to data such as an address, a mail server or a text value. The common types and what breaks when one changes.
  • NameserverA nameserver is the server that holds a domain’s DNS records and answers queries for them. Why moving nameservers moves the whole zone and what to copy first.
  • CNAMEA CNAME record makes one name an alias of another. Why a name with a CNAME cannot hold other records, which blocks it from the root of a domain.

Know first. Know why. Tell your client before they call.

Paste your client list. Both regions start checking.

No card for the trial.