Recording the exact type of DNS error changes the resolution. Not being able to find a name, not being able to answer the server, and not getting a response at all are different situations.

Basic approach

NXDOMAIN indicates that the queried name does not exist; NODATA is when the desired record type does not exist even though the name exists. SERVFAIL indicates that the server was unable to complete the query successfully. Negative responses may also be cached, so a newly added record may not appear immediately.

Application steps

  1. Check the domain name for typos and incorrect DNS suffix.
  2. Separate queries A and AAAA on the same server; Save the response code.
  3. Narrow down the cause of failure with delegation information, DNSSEC status, and resolver logs.

Practical example

If a subdomain you just created returned NXDOMAIN first, some clients may use the negative cache after the record is added. On the other hand, seeing SERVFAIL may not be a propagation problem that can only be solved by waiting longer.

Interpret the result correctly

A useful comparison is if a different DNS server responds successfully; but corporate internal domains may not be available in the public resolver. Check the resolution design before sending internal network names to arbitrary external services.

Source and follow-up reading

Protocol or command details: RFC 2308. The steps and example scenario are IPScans editorial narrative.