Unix Tutorial - technical guides and how-tos on Linux/Unix and macOS

FB2 Using Dig Command to Confirm TTL for a DNS Zone Entry

Using dig command to confirm TTL for a DNS zone entry

As you probably know, TTL (time-to-live) parameters can be set not only for the whole DNS zone you’re managing, but for each individual zone entry. A common example could be a higher TTL for the zone as a whole, while having much smaller TTLs for critical servers like web or MX servers.

Not everyone is aware that dig command is very useful for entry-specific DNS research. This post just shows you a very simple example.

dig to confirm TTL for a DNS entry

When using dig, we’re usually after a specific section of its output. Consider this simple query (your output may slightly vary):

srv1# dig www.google.com

This query targets a specific DNS record – namely the www. one, rather than a whole google.com domain.