Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed bind on my qmail server with the goal of avoiding DNS queries for domains that the server already ask a few seconds/minutes ago, as caching server. So now, resolv.conf has as nameserver, and after a while the new local-bind is answering almost every query.

However, I can see (using tcpdump) that the server is still asking for a lot of domain to my primary and secondary DNS servers (Using forward), and just realized this:

DNS query : MX?

DNS answer: ServFail

Well, as you can see I'm receiving a NXDOMAIN (ServFail)

The question, is it possible to tell my local-DNS to not retry for NXDOMAIN received?, at least remember the fail for a while, and thus avoiding all these useless queries?

Thanks guys!.

share|improve this question
Sorry, I mean that I'm receiving a NOERROR response, not NXDOMAIN. – CarlosH Jul 23 '10 at 0:01
You can edit your question to change the context – Mark Henderson Jul 23 '10 at 0:02

A NOERROR (aka NODATA) response means that the domain exists, but that the specific resource record type requested (MX?) does not.

Your DNS server should wait for the "minttl" time specified in that response before asking again. This also applies to the SERVFAIL response, if seen. See RFC 2308.

Note though that any such TTL is advisory. If your name server runs out of cache it's perfectly free to forget that a record doesn't exist and query for it again when asked.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.