What is TTL?

TTL is an acronym for “Time To Live.” This value indicates how long (usually expressed in seconds) that you want to allow external nameservers to cache the information about a given DNS record.

For instance, if you set the TTL for an given record to 3600 seconds (1 hour), you are giving external nameservers permission to serve that information out for one hour, without checking back to your authoritive nameserver. This has two primary consequences.

  • Fewer lookups will need to come to your nameserver as external systems will be able to serve the record information without needing to check back in.
  • If a change is made to the record, it may take up to the length of the TTL (1 hour in our above example) for all systems on the internet to become aware of the change.

Back to Top

What is a “default” TTL and how do I set it?

The default TTL setting available from the TTL dropdown box found in the resource record editor is a special setting that allows you to sync the TTL value to that of the default TTL value defined in the SOA editor. This allows you to change all resource records TTL value within a zone/domain that have been previously set to default from the TTL dropdown box just by change the default TTL value defined within the SOA editor.

If the default TTL value in the SOA editor was set to 12 hours, and all other resource records within a zone/domain had their TTL values set to default from the TTL dropdown box. The resource record TTL value would be set to 12 hours. To change all the resource record TTL values at once to 6 hours you would only need to change the default TTL value defined within the SOA editor. Any resource record who’s TTL value was not set to default would have to be edited individually. With a little advanced planning this give you an easy way to change a group of resource record TTL values quickly and easily.

Note: This setting is not available for resource records with the Dynamic DDNS service enabled. These resource records will have a 1 minute TTL value.

Back to Top

What are the TTL settings for a Load Balance service?

The records in a Load Balance Service will have a TTL equal to half the monitoring period. For instance, if the monitoring period is set to 10 minutes, the TTL for all records will be set to 5 minutes.

Back to Top

What are some common TTL values?

The default or recommended value for the following DNS record types in our Dynect platform are:

Record Type TTL Value in Seconds
A (Dynamic) 60 (1 minute) — cannot be edited
A (Static) 21600 (6 hours)
AAAA (Dynamic) 60 (1 minute) — cannot be edited
AAAA (Static) 21600 (6 hours)
A — Failover and Load Balanced See note below
CNAME — Canonical Name 43200 (12 hours)
MX — Mail Exchanger 43200 (12 hours)
KEY — RSA Public Keys 86400 (24 hours)
LOC — Location 86400 (24 hours)
NS — Name Server 86400 (24 hours)
PTR — Pointer 86400 (24 hours)
SRV — Service Location 86400 (24 hours)
TXT — Text 43200 (12 hours)
A — Failover and Load Balanced Hosts

The records in a Load Balance Service will have a TTL equal to half of the monitoring period. For instance, if the monitoring period is set to 10 minutes, the TTL for all records will be set to 5 minutes. See Load Balance Service for more information.

In the WBZE (web based zone editor) interface, you can modify the TTL value for most record types by selecting the TTL value from the drop down selection box. An example of one record type that can not be edited is a dynamic host record as it has its TTL value set to 1 minute. Once a host record is set to have dynamic services the drop down box to select a TTL value is no longer present for that host

Caching Issues

When a client attempts to access a domain before it exists, a “does not exist” record will be saved. The TTL for these records varies from server to server, but the average TTL is about 2 hours. During this time period, domain name resolution may not be possible.

Browsers can have their own caching issues outside of the local recursive DNS. Some browsers may cache DNS lookups for the length of the session.

Why do some records have such high TTLs?

The TTL values of resource records exist to ease the query load on name servers. Many records, such as MX or CNAME records, are expected to change very rarely, so they are usually given high TTL to prevent unnecessary extra lookups. Other records, such as hosts assigned to dynamic IP addresses, are given very low TTLs, as they are expected to change at a moment’s notice.

Please also remember that the Dynect platform tracks QPS (queries per second) for billing purposes. Resource records with higher TTL values will lessen the number of queries against our authoritative name servers and lower your QPS billing.

What if I plan to change my IP address(es)?

If you plan on changing your IP address(es) on a host with a higher TTL value you should change the TTL values on the resource record the day before the IP address change to something lower like 10 minutes. This will allow the recursive DNS servers across the Internet to expire the higher TTL values so that when the time comes to change the IP address you only need to wait for 10 minute before all users are connected via the new IP address. Then once done with all of your IP address changes you can put the TTL values back to there normal setting.

Back to Top