Practical guide
How to use the DIG tool
dig is the standard DNS troubleshooting tool because it shows the actual DNS response — not a polished summary. This page runs the same query against a public resolver and gives you the full answer to read or share.
What this tool checks
DIG sends a single DNS query to a recursive resolver and returns the full response: header flags, the question section, the answer, any authority and additional records, and a TTL for each row. Unlike a plain lookup, it shows you exactly what came back on the wire, which is what you need when something is wrong.
When to use it
Use DIG when a lookup looks fine but mail still bounces, when DNSSEC validation fails, when you need to read TTLs before a cutover, when a resolver returns a different answer than expected, or when you want a clean output to paste into a ticket. It is also the right tool for queries that other interfaces hide, such as TYPE65 / HTTPS records or large TXT bundles.
How to read the result
The header line shows the status (NOERROR, NXDOMAIN, SERVFAIL, REFUSED) and the flags (qr, aa, rd, ra, ad). The ANSWER SECTION holds the records the resolver returned. The TTL column is in seconds. The AUTHORITY and ADDITIONAL sections are not always present but show the nameservers and glue records the resolver used. If the answer is empty but the status is NOERROR, the record type does not exist for that name.
Common errors and what they mean
NXDOMAIN means the resolver was authoritatively told the name does not exist. SERVFAIL almost always points to a broken DNSSEC chain or an unreachable authoritative server. A correct NOERROR with zero answers means the record type is missing for an existing name. If the AD flag is missing on a domain you expect to be signed, DNSSEC validation is failing somewhere upstream.
Example DIG query
- Example input
dig example.com A @1.1.1.1- Example result
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12345 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1 ;; ANSWER SECTION: example.com. 3600 IN A 93.184.216.34
Status NOERROR plus a populated ANSWER section is the success case. The TTL (3600) tells you how long Cloudflare will cache this answer before re-asking the authoritative servers.
Related tools
Related guides
DNS Records Explained
What A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, and CAA records are for, and how to read them in dig output.
Read guideDNS TTL Explained
How to read the TTL column and how to pick a value that ages well during a migration.
Read guideNXDOMAIN vs SERVFAIL
Two DNS error codes that look similar but mean very different things. Decode them from dig's status field.
Read guideFAQ
What is the difference between dig and nslookup?
How do I read the status field in a dig answer?
What does the TTL column mean?
Why does this tool show different answers than my command-line dig?
Can I query DNSSEC records with this tool?
Last reviewed: 2026-05-20.