SecDNS

NXDOMAIN

NXDOMAIN is the DNS response code indicating that the queried name does not exist anywhere in the zone hierarchy, used by RPZ-based blocking and authenticated by DNSSEC.

NXDOMAIN

NXDOMAIN (response code 3) is the DNS reply that tells a client the queried name does not exist anywhere in the zone hierarchy. It is the standard "this name was never registered" answer.

In plain English

When you ask DNS for notarealsite.example and nothing has ever been published with that name, the resolver answers with NXDOMAIN. Filtering services repurpose the same response code to make a malicious or unwanted domain look like it simply does not exist.

How it works

NXDOMAIN is RCODE 3 in the DNS header, defined in RFC 1035 and tightened by RFC 2308 (negative caching) and RFC 8020 (NXDOMAIN cut, which states that if a name does not exist, no name below it can exist either). The authoritative server for the zone returns it when the queried QNAME has no records and no children. Recursive resolvers cache NXDOMAIN responses for the duration of the zone's SOA MINIMUM field (capped by the resolver's policy), which is why a typo or a freshly-deleted record can linger. With DNSSEC the absence of a name is proven cryptographically using NSEC or NSEC3 records, so an attacker cannot spoof an NXDOMAIN to hide a real name. Protective DNS engines often synthesise NXDOMAIN via RPZ to block malicious domains in a way that applications already understand.

  • DNS — protocol that defines the response code
  • RPZ — uses NXDOMAIN to block names
  • DNSSEC — proves NXDOMAIN authenticity via NSEC/NSEC3
  • SOA — controls NXDOMAIN cache duration
  • TTL — relevant for negative caching
  • Protective DNS — common source of synthesised NXDOMAIN

SecDNS perspective

When SecDNS blocks a domain we return NXDOMAIN by default — silent and indistinguishable from a non-existent name, which is the cleanest signal for clients that the destination is not available.

Frequently asked questions

Is NXDOMAIN the same as a blocked domain?

Not exactly. NXDOMAIN means "no such name exists." Protective resolvers often return NXDOMAIN to block a domain, but legitimate domains can also return it when a subdomain is genuinely absent.

How long is NXDOMAIN cached?

For the lesser of the SOA MINIMUM field and the SOA record's TTL, per RFC 2308. Typical values are a few minutes to an hour.