How to Read dig Output and Trace a DNS Answer

Read dig status, flags, answer and authority sections, then compare a recursive result with the authoritative answer for your domain.

FBFenwei BianAuthorNov 24, 2026
  • dns
  • dns-tools
  • troubleshooting
  • guide

Start a DNS investigation with the full dig output. The short form shows a value when one is available. The full response shows what you asked, who answered, and whether the answer came from an authority or a resolver. Those details matter when you have just changed a record or switched nameservers.

Read the response from top to bottom

Suppose you run dig example.test A against a resolver in a test environment and get the following illustrative values. Substitute a name in a domain you manage for a real check. DNS test names do not resolve on the public internet.

OutputExampleWhat it tells you
Header statusstatus: NOERRORThe server returned a successful DNS response. Check whether the requested type appears in the answer.
Flagsqr rd raThis is a response. The request asked for recursion, and the server says it offers recursion.
Questionexample.test. IN AYou requested an IPv4 address record for the exact name shown.
Answerexample.test. 300 IN A 192.0.2.20This answer has a TTL of 300 seconds. For a cached reply, the TTL may be counting down.
Server192.0.2.53#53This is where your copy of dig received the reply. The address need not belong to the authoritative server.
Query time14 msecThis is the measured time for this query, which may have been answered from a cache.

RFC 1035 defines the header flags and return codes. In a direct query for a name the server serves, look for aa, the authoritative-answer flag.

Distinguish empty answers from errors

A NOERROR response with no records of the requested type can mean the name exists but the type is missing. For a negative answer, the authority section can contain the zone's SOA record. An empty answer with nameservers in the authority section can instead be a referral. NXDOMAIN reports that a name does not exist. SERVFAIL means the server could not complete the query, and leaves the existence question open.

If you see a CNAME in the answer, read its target before deciding what is missing. Your server may have found the alias and then failed to find the target. RFC 2308 gives examples of negative responses with aliases, referrals, and SOA records.

Check delegation separately from cache

Run dig +trace your-domain.example A, replacing the placeholder with the domain you manage. BIND documents that +trace follows referrals from the root. Look at the last referral before the final answer. If the parent points to old nameservers, first check the registrar's delegation for the domain. If the parent points to your intended nameservers, query one directly with dig @ns.your-provider.example your-domain.example A +norecurse.

A direct authoritative reply that shows the new value while the recursive answer still shows the old one points toward cache or resolver-specific policy. If the authoritative nameservers disagree with one another, check how the zone was deployed. A failed trace from a network that blocks direct DNS is inconclusive. You can still compare results from an approved resolver and the authoritative service through a network that allows the queries.

Sources and further reading

About the author(s)

Software Developer & Writer • Namefi
FBAuthor

Fenwei Bian is a software developer in her thirties who spends her working hours in pull requests and her weekends with her hands in soil or sawdust. Years of open source on GitHub taught her that names are interfaces: a good one is clear, honest about what it does, and kind to whoever has to use it next.

She gardens because it rewards patience and punishes wishful thinking, and she does woodwork because a joint either fits or it doesn't. Both habits show up in how she writes about naming — measure twice, check the source, and don't sand over a rough spot and hope no one notices.

For Namefi she writes about how domain markets actually move, the practical trade-offs of tokenizing and flipping names, and picking a domain you'll still be glad you own in twenty years.

Related guides

Discuss this post

View the discussion on Namefi Discuss