A missing address is not always a missing name

Suppose you look up the IPv4 address for a hostname and receive no address. It is tempting to conclude that the hostname does not exist, but DNS answers a more specific question: does this name have a record of the requested type? A name can exist without having an A record. It might have an AAAA record for IPv6, an MX record for mail routing, or another record type instead.

This distinction matters when troubleshooting. If you treat every empty address lookup as a nonexistent name, you may add a record in the wrong place or overlook a problem with the record type your application actually needs. Two common outcomes, NXDOMAIN and NODATA, help separate those possibilities.

NXDOMAIN means the queried name does not exist

NXDOMAIN is a DNS response code indicating that the queried domain name does not exist. For example, if you accidentally ask for a misspelled hostname, an NXDOMAIN response may point to the typo rather than to a missing A record. Changing the requested record type will not normally produce a record for that same nonexistent name.

Check the entire name before editing a zone: spelling, omitted labels, an unintended suffix added by a device, and whether you queried the domain you meant to query. If you recently created the name, also check that you made the change in the DNS zone served by the domain’s current authoritative nameservers. A correct record in an unused zone will not answer public queries.

NODATA means the name exists, but not with that record type

NODATA is a common term for a successful DNS response that contains no answer record of the requested type. Unlike NXDOMAIN, it does not say that the name itself is absent. If a hostname has an AAAA record but no A record, an A-record lookup can return NODATA even though an AAAA-record lookup succeeds. Likewise, a name used for one DNS purpose does not automatically have records for every other purpose.

The precise DNS response may contain information outside its answer section, so an empty answer section alone is not enough to identify NODATA. Look at the response code as well as the records returned. A successful response with no record of the type you requested calls for a different next step from NXDOMAIN: confirm that you requested the right type, then decide whether that type of record is actually needed at that name.

Do not assume an empty answer means you should add an address record. A mail setup, for instance, may require you to inspect MX records at the domain and address records at the mail host named by those MX records. Keeping the name and record type separate makes the investigation more focused.

Why a corrected record may not appear immediately

DNS resolvers can cache negative answers as well as successful ones. If a resolver recently learned that a name did not exist, or that it had no record of a requested type, it may continue returning that result for a limited time after you make a correction. The caching period for a negative answer is derived from information associated with the zone’s SOA record, rather than from the TTL of a positive record that was not returned.

To narrow down what is happening, repeat the exact name-and-type lookup and compare the response from your usual recursive resolver with a direct query to an authoritative nameserver for the zone. If the authoritative server shows the new record but the recursive resolver still gives the old negative answer, caching is a plausible explanation. If the authoritative server also lacks the record, review the zone, the record’s owner name, and the active delegation before waiting for a cache to expire.

Finally, keep other failures separate from missing data. SERVFAIL, for example, signals that the server could not complete the query; it is not proof that the name or record is absent. Reading the response code first, then checking the requested name, type, and authoritative data, gives you a practical way to troubleshoot without making speculative DNS changes.

Back to category ↗