TTL (time-to-live)

DNS zone file entries (resource records) usually have defined TTL settings that tells caching name servers how long to keep the cached resource record before discarding and retrieving it again.

In other words, the TTL defines how long a given resource record will remain in other nameservers' caches. This is an important (but by no means the only) factor in how quickly your zone changes propagate.

It is good practice to set your TTLs to be high as is comfortable, depending on how often you update your zone file. If you plan to make major changes, it's a good idea to turn this value down temporarily beforehand. Then wait the previous minimum value, make your changes, verify their correctness, and turn this value back up.

Having shorter TTLs can cause heavier loads on authoritative web servers, since they must respond to more queries.

TTLs are measured in seconds. 10800 (3 hours) is a common value.

"TTL mismatch" error

You may encounter an error when editing your TTLs if you have more than one record of the same type (A, CNAME, MX) for the same domain or subdomain, or when adding a new record when one of the same type (with a different TTL) already exists:

For example: this is not possible:

www 10800 IN A 123.123.123.123
www 21000 IN A 112.112.112.112

And will result in the following error message:

Errors: 
A record already exists using these same values.
Error on object : OBJECT_ZONE (CAUSE_VALUE) [ttl mismatch for MX @]

TTLs (time-to-live) on records of the same type must match, so our “normal” zone file interface won't let you edit them one at a time.

You can make the changes using expert mode instead, as long as the updated TTL is the same for all records of the same type with the same value.

See also:

Last modified: 07/23/2012 at 10:10 by Ryan A. (Gandi)