# TTL

What is a TTL in DNS?

The TTL (time to live) of a [DNS record](/glossary/dns-record) is the number of seconds a resolver may keep the record in its cache before it has to look it up again. Whoever manages the zone sets it, per record. A long TTL means fewer lookups and faster answers; a short TTL means a change reaches everyone sooner.

## How it works

The TTL is the number right after the name:

```text
example.com.  300  IN  A  203.0.113.10
```

Here it is 300 seconds, five minutes. A resolver that fetched this record at 12:00 answers from its cache until 12:05 without asking your name servers. While it holds the copy, it hands out the remaining time, so asking the same resolver twice shows a TTL that counts down.

There is no push in [DNS](/glossary/dns). What is often called propagation is caches around the world expiring one by one and fetching the new value.

Answers that a name does not exist are cached too. That negative answer is kept for a time taken from the zone's SOA record, so a name you create just after someone looked it up can stay invisible to them for a while.

## Why it matters

The TTL decides how long a mistake lingers and how quickly a migration or a failover takes effect. Before a planned change, lower the TTL and wait at least one full period of the old TTL, so every cache has picked up the short value. Make the change, check it, then raise the TTL again.

## What can go wrong

- You change a record that has a long TTL, and some visitors keep reaching the old server until their resolver's copy expires. You cannot flush caches that other people run.
- You lower the TTL at the same moment you make the change. Caches still hold the old record with the old TTL, so nothing moves faster.
- A new subdomain or a validation record was looked up before it existed, and the cached "does not exist" answer delays it.
- Some resolvers apply their own minimum or maximum, so a very short or very long TTL is not always honored.

## Check it

The [DNS lookup](/tools/dns-lookup) lists every record of a domain grouped by type, each with its TTL. Ranetrace's [DNS monitoring](/features/dns-monitoring) re-reads your records every hour and tells you when one changes.

Read this definition in a browser: https://ranetrace.com/glossary/ttl
