Skip to content


How-to Guides

Technical References

Check DNS record Time to Live

These instructions will demonstrate how to determine a DNS record’s Time to Live value using common command line tools.

Time to Live (TTL) is a value associated with a DNS record that tells other servers how long to cache the DNS record. Longer TTLs mean that DNS resolvers cache the data longer, and it can take longer for changes to propagate to various DNS servers across the globe.

Because lowering a long TTL in the DNS record does not immediately purge cached values in other nameservers, it’s important to check (and lower, if necessary) this setting well in advance of any changes, including a site launch. And verify it again on the morning of launch.

The best way to verify this is to check with your DNS provider directly, but this method provides an independent verification by querying the DNS.

Checking the current TTL

This example is for our domain

  1. Determine the root of the domain, which is normally just the last two parts, e.g. the root of is, and the root of is However, there are some top level domains that use two segments, such as, and so for and, the root is
  2. In a shell or terminal window, run dig using the domain root (, to identify the authoritative nameserver:
$ dig +nssearch
SOA 2005071858 14400 7200 604800 300 from server in 22 ms.
SOA 2005071858 14400 7200 604800 300 from server in 22 ms.
SOA 2005071858 14400 7200 604800 300 from server in 22 ms.
  1. From the output, the first line starting with SOA shows the nameserver, which often starts with NS1 (but not always) e.g.
  2. In a shell or terminal window, run dig again (in this case, explicitly requesting the info from the authoritative nameserver) to get the full domain’s ( entry and current TTL from the authoritative server:
$ dig +noall +answer		14400	IN	CNAME		3600	IN	A

Since the entry for is a CNAME, the output also includes the record for the target, which is the root domain,

The number next to the full domain, in this case 14400, is the TTL for that record in seconds.

In the example above, the TTL of 14400 means that any changes – to the TTL or the CNAME or A record of the domain – may take 4 hours to propagate to other nameservers.

Reducing the TTL of a DNS record to 300 seconds at least a day before launch means that when the IP / CNAME / A record is changed at launch time, propagation will be quicker and most browsers will be directed to the newly launched site within a few minutes of launch.

Last updated: April 09, 2021