Glossary / DNS basics
TTL (time to live)
TTL, short for time to live, is the number of seconds a DNS resolver may keep a record in its cache before it must ask again. A TTL of 3600 means one hour. Short TTLs make changes spread faster, while long TTLs cut lookups and keep answers steady.
Copy the syntax
TTL in a zone file
www.example.com. 300 IN A 192.0.2.10The second field, 300, is the TTL in seconds.
See the TTL a resolver is counting down
dig www.example.com A +noall +answerRun it twice; the number drops as the cache ages.
Have a name in mind?
.com $24.99 first year, renews at $24.99/yr. Other endings: not on sale yet.
In plain English
TTL is how long other computers remember a DNS answer before they check for a new one.
What to do
- Use about an hour for records that rarely change.
- Lower it to five minutes a day before a planned change.
- Raise it again once the change has settled.
- Defined in
- RFC 1035, section 3.2.1Source: RFC 1035
- Unit
- Seconds, a 32-bit valueSource: RFC 2181
- Negative caching
- Set by the SOA record, RFC 2308Source: RFC 2308
Why do DNS changes take time?
Resolvers that already cached a record keep using it until its TTL runs out. Change an A record with a one-hour TTL and some visitors reach the old server for up to an hour.
Nothing you do at your DNS host can clear other people’s caches early.
What TTL should I use?
An hour (3600) is a sensible default for records that rarely change. Drop to 300 seconds a day before a planned move, make the change, then raise it again once things settle.
Common TTL values
| TTL | Equals | Good for |
|---|---|---|
| 300 | 5 minutes | Records you are about to change |
| 3600 | 1 hour | Most records |
| 86400 | 1 day | NS and records that never move |
Questions about TTL (time to live)
Does a lower TTL slow my site down?
Barely. Resolvers look the name up more often, which adds a few milliseconds on some visits. The cost is small next to the benefit when you need a change to spread quickly.
Can I set TTL to zero?
RFC 1035 allows a TTL of zero, meaning do not cache, but many resolvers enforce a minimum anyway. Use a short value such as 60 or 300 instead.
Why did my change show up for some people and not others?
Each resolver cached the old record at a different moment, so each one expires at a different time. Within one TTL of your change, everyone sees the new answer.
Does flushing DNS reset the TTL?
Flushing clears your own computer’s cache only. Your ISP’s or a public resolver’s cache keeps counting down its own TTL.
Put it to work on your own domain
See the first-year and renewal price before you pay.