Does a DNS resolver query the next name server if it receives a rcode of NXDOMAIN or SERVFAIL from the first one?
I queried for www.domaindoesenotexist.com. Will my DNS resolver query the next .com gTLD server if it receives rcode of NXDomain of Servfail from the first?
This answer assumes that we're discussing a recursive DNS server. (not a stub resolver)
-
In the case of
NXDOMAIN
, the next server is not tried. -
Womble is correct, there is no need to continue polling DNS servers.
-
That said, it should be noted that recursive server will see additional lookups from stub resolvers that implement DNS search suffixes. Search suffixes make it necessary to secure a
NXDOMAIN
for every possible permutation of the query and the configured suffixes. This is different from the usual case, where the stub resolver is typically "dumb" and does not make additional queries based on the answer. -
In the case of
SERVFAIL
, the next server is attempted.
https://www.rfc-editor.org/rfc/rfc1034#section-5.3.3
d. if the response shows a servers failure or other
bizarre contents, delete the server from the SLIST and
go back to step 3.
No, because NXDOMAIN
is an authoritative declaration that the requested resource does not exist.