DNS Response Codes
DNS response codes (RCODEs) indicate the status of a DNS query. The 4-bit RCODE field in the DNS header carries codes 0–15. Extended RCODEs (16–65535) are carried in EDNS0 OPT records. Source: IANA DNS Parameters registry.
20
RCODEs
Core RCODEs (0–11)
Carried in the 4-bit RCODE field of the DNS message header. Defined in RFC 1035 and extensions (RFC 2136, RFC 8490).
| Code | Name | Description | RFC | |
|---|---|---|---|---|
| 0 | NoError | No Error | RFC 1035 | |
| 1 | FormErr | Format Error | RFC 1035 | |
| 2 | ServFail | Server Failure | RFC 1035 | |
| 3 | NXDomain | Non-Existent Domain | RFC 1035 | |
| 4 | NotImp | Not Implemented | RFC 1035 | |
| 5 | Refused | Query Refused | RFC 1035 | |
| 6 | YXDomain | Name Exists When It Should Not | RFC 2136 | |
| 7 | YXRRSet | RR Set Exists When It Should Not | RFC 2136 | |
| 8 | NXRRSet | RR Set That Should Exist Does Not | RFC 2136 | |
| 9 | NotAuth | Server Not Authoritative / Not Authorized | RFC 2136 | |
| 10 | NotZone | Name Not Contained in Zone | RFC 2136 | |
| 11 | DSOTYPENI | DSO-TYPE Not Implemented | RFC 8490 |
Extended RCODEs (16+)
Carried in the EDNS0 OPT record (RFC 6891). Used for TSIG authentication errors, TKEY negotiation, and DNS Cookies.
| Code | Name | Description | RFC | |
|---|---|---|---|---|
| 16 | BADVERS | Bad OPT Version / TSIG Signature Failure | RFC 6891 | |
| 17 | BADKEY | Key Not Recognized | RFC 8945 | |
| 18 | BADTIME | Signature Out of Time Window | RFC 8945 | |
| 19 | BADMODE | Bad TKEY Mode | RFC 2930 | |
| 20 | BADNAME | Duplicate Key Name | RFC 2930 | |
| 21 | BADALG | Algorithm Not Supported | RFC 2930 | |
| 22 | BADTRUNC | Bad Truncation | RFC 8945 | |
| 23 | BADCOOKIE | Bad/Missing Server Cookie | RFC 7873 |