How to find DNS Time to Live (TTL) Values using dig

TTL for Specific Host

The dig(1) command is a handy DNS information and troubleshooting tool. It can be used to grab a host or domain’s TTL (time to live) values.

 

Dig’s default output provides the TTL information, it is the number preceding the record type:

# dig +nocmd +noall +answer www.yourwebsite.com

www.ateamsystems.com.   200     IN      A     <ip-address>

Note: If the default DNS server is not the authoritative server for the zone you are digging dig will show the time remaining(until the next refresh) instead of the raw TTL value in this position.

You can work around this by directing dig to specifically use one of the domain’s servers, for example I know that ns1.ateamservers.com is authoritative for this domain:

# dig +nocmd +noall +answer @ns.authoritative www.yourwebsite.com

www.yourwebsite.com. 200 IN A <ip-address>

Default TTL (and negative-TTL) for a Domain

We can also pull the domain-wide TTL setting, meaning how long a server will cache an NX :

# dig +nocmd +multiline +noall +answer any yourwebsite.com

automolenaar.com. 3600 IN A 151.236.29.173
automolenaar.com. 3600 IN SOA ns1.yourdomainnameregistrar.com. hostmaster.yourdomainnameregistrar.com. 
                       2014061506 ; serial
                      10800 ; refresh (3 hours)
                       3600 ; retry (1 hour)
                     604800 ; expire (1 week)
                       3600 ; minimum (1 hour)
 


Password Reset
Please enter your e-mail address. You will receive a new password via e-mail.

Power by

Download Free AZ | Free Wordpress Themes