TTL (time to live)

Time to live: how many seconds a resolver may cache a DNS answer before asking again. Set per record, and handed out with every answer.

Time to live: how many seconds a resolver may cache a DNS answer before asking again. Set per record, and handed out with every answer.

TTL (time to live)

Time to live: how many seconds a resolver may cache a DNS answer before asking again. Set per record, and handed out with every answer.

What it means for you

TTL is the dial that decides how long a mistake lasts and how quickly a planned change takes effect. When a resolver fetches a record it keeps the answer for the TTL it was given, and every visitor using that resolver gets the cached copy until the timer runs out. A long TTL, such as 86400 seconds (a day), is cheap and stable; a short one, such as 300 seconds, costs more lookups and lets you move fast. The practical rule is to lower the TTL on the records you are about to change a day ahead, make the change, then raise it again. Lowering it at the moment of the change does nothing, because the old, long value is already cached everywhere. Two TTLs sit outside your records: the parent zone's TTL on your NS records, which governs how fast a nameserver move takes hold, and the negative-cache TTL in your SOA, which governs how long a resolver remembers that a name did not exist.

Example

A site's A record has a TTL of 3600. The owner moves hosting and changes the address at 09:00. A resolver that cached the old answer at 08:59 keeps sending visitors to the old server until 09:59. Had the owner dropped the TTL to 300 the day before, the stale window would have been five minutes.

Related terms DNS propagation SOA record A record

Monitor it DNS change detection

Tool Check propagation across resolvers

How to check a record's TTL

  1. Look up the domain's DNS records and read the TTL beside each one, in seconds.
  2. That number is the longest a resolver may keep serving the old value after you change the record.
  3. Before a planned change, lower it to 300 a day ahead, wait out the old TTL, then make the change.
  4. Enter the domain below to read its live records and their TTLs.

The status label and the stage sentence above are the same ones Domainyze shows on a monitored domain.

DNS records
A record
Maps a hostname to an IPv4 address. It is the record that answers "where is this website".
AAAA record
The IPv6 equivalent of an A record: it maps a hostname to an IPv6 address.
CNAME record
Aliases one name to another, so the resolver looks the second name up instead. Used to point a subdomain at a provider's hostname.
MX record
Names the mail servers that accept email for the domain, each with a priority number. The lowest number is tried first.
NS record
Names the authoritative nameservers for a zone. The registry publishes these for your domain, and they decide who answers every other question about it.
TXT record
Holds arbitrary text. It has no protocol meaning of its own, which is why so many systems use it to publish policy and verification strings.
SOA record
The start of authority: one record per zone, carrying the primary nameserver, the administrative contact and the timers that govern zone transfers and negative caching.
CAA record
Lists the certificate authorities permitted to issue certificates for the domain. A CA is required to check it before issuing.
SRV record
Advertises the hostname and port of a specific service for a domain, under a name that encodes the service and protocol.
DS record
The Delegation Signer record: a hash of your zone's signing key, published in the parent zone by the registry so a resolver can verify that the DNSSEC signatures in your zone are the right ones.
DNS propagation
The period after a DNS change during which some resolvers still answer with the old value, because they cached it before the edit.
Wildcard DNS record
A record whose name starts with an asterisk, such as *.example.com, that answers for any name under it that has no record of its own.

How DNS works Browse the category All glossary terms