Basic In this example, dig is used to query for
any type of record information in the domain
example.com: $ dig example.com any ; > DiG 9.6.1 > example.com any ;; global options: +cmd ;; Got answer: ;; ->>HEADER The number
172719 in the above example is the
time to live value, which indicates the time of validity of the data. The
any DNS query is a special meta query which is now deprecated. Since around 2019, most public DNS servers have stopped answering most DNS
ANY queries usefully RFC8482 - Saying goodbye to ANY. If
ANY queries do not enumerate multiple records, the only option is to request each
record type (e.g. A, CNAME, or MX) individually.
Specific DNS server Queries may be directed to designated DNS servers for specific records; in this example,
MX records: $ dig wikimedia.org MX @ns0.wikimedia.org ; > DiG 9.11.3 > wikimedia.org MX @ns0.wikimedia.org ;; global options: +cmd ;; Got answer: ;; ->>HEADER
With output formatting There are many output formatting options available. A common selection to make the output more terse is: $ dig +noall +answer +multiline wikimedia.org MX wikimedia.org. 3600 IN MX 10 mx1001.wikimedia.org. wikimedia.org. 3600 IN MX 50 mx2001.wikimedia.org. Where
+noall +answer +multiline are simply output formatting flags. ==History==