Generic DNS response codes
Defined in RFC 1035, RFC 2136 and RFC 8914, these are the response codes possible to receive from a DNS query, dynamic update request or zone transfer.
DNS response codes (RFC 1035)
NOERROR
No error condition found in the response. The name in the query exists, but not necessarily of the requested request type.
FORMERR
The responding name server were unable to interpret the request due to a format error.
SERVFAIL
The name server encountered an internal failure while processing this request, for example an operating system error or a forwarding timeout. Read more about this response code further down under the RFC 8914 headline.
NXDOMAIN
A name that should exist does not exist. The NXDOMAIN response should be an absolute confirmation that the requested name does not exist in the name space, regardless of the type of query. We have found that some name server implementations don’t follow this rule and instead use the NXDOMAIN result code for the specific query type.
NOTIMP
The response code means that the name server does not support the opcode specified in the query request.
REFUSED
For policy or security reasons, the name server refuses to perform the requested operation.
DNS response codes (RFC 2136)
The following response codes are predominately used when performing dynamic updates.
YXDOMAIN
A name that should not exist, does exist.
YXRRSET
An RRset that should not exist, exists.
NXRRSET
Some RRset that ought to exist, does not exist.
NOTAUTH
The server is not authoritative for the zone name in the Zone section.
NOTZONE
A name used in the Prerequisite or Update Section is not within the zone denoted by the Zone Section.
Extended DNS Errors (RFC 8914)
In RFC 1035 (November 1987) which defines the DNS protocol the number of response codes was set to 16. As mentioned earlier in this document under the SERVFAIL heading, there are many reasons for a DNS to fail and the number of response codes simply is too few.
In October 2020 the RFC 8914 was published as an Internet standard by the IETF to allow DNS implementations to provide additional error responses.
As of now the SERVFAIL response code is used for more than just internal server failures such as failed DNSSEC validations and so on.
