DNS return codes (RCODE)

This article is a guide to common DNS return codes or RCODE.

Every DNS query response includes an accompanying code describing what happened when the query was made. These return codes include short names (DNS return messages) which help to easily understand what they mean.

DNS return codes mostly describe what happened when a query fails. If a query is successful (which is often the case, fortunately ^^_) the return code is RCODE:0; short name NOERROR.

NOERROR is the most common DNS return code (RCODE), but there are many other and some of them are very seldom seen.

Below is a list of the most common DNS return codes. See the exhaustive list here on the IANA website.

 

Return Code Return Message Description
RCODE:0  NOERROR DNS Query completed successfully
RCODE:1 FORMERR DNS Query Format Error
RCODE:2 SERVFAIL Server failed to complete the DNS request
RCODE:3 NXDOMAIN Domain name does not exist
RCODE:4 NOTIMP Function not implemented
RCODE:5 REFUSED The server refused to answer for the query
RCODE:6 YXDOMAIN Name that should not exist, does exist
RCODE:7 XRRSET RRset that should not exist, does exist
RCODE:8 NOTAUTH Server not authoritative for the zone
RCODE:9 NOTZONE Name not in zone

 

 

More info: https://noerror.org/

Blog Stéphane Bortzmeyer: RFC 8914: Extended DNS Errors