Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

If a DNS server looks up a record and it's missing, it will often "negatively cache" the fact that this record is missing, and not try to look it up again for a while. I don't see anything in the RFC about the TTL on negative caching should be, so I'm guessing it's somewhat arbitrary. In the real world, how long do these negative records stick around for?

share|improve this question
RFC 2308, Negative Caching of DNS Queries explains how this is supposed to work. (Related SO question: Does a caching nameserver usually cache the negative DNS response SERVFAIL?) – Skyhawk Sep 12 '12 at 16:06
up vote 22 down vote accepted

The TTL for negative caching is not arbitrary. It is taken from the SOA record at the top of the zone to which the requested record would have belonged, had it existed. For example:    IN      SOA (
            2012091201 43200 1800 1209600 86400 )

The last value in the SOA record ("86400") is the amount of time clients are asked to cache negative results under

If a client requests, it will cache the result for 86400 seconds.

share|improve this answer
@MarcusAdams ...and a client won't negative-cache any records on SERVFAIL. The TTL in the SOA record is, in fact, used for negative caching. That's why the SOA record is produced in NXDOMAIN answers. – Celada Jul 17 at 11:45
@MarcusAdams Correct. If you get a SERVFAIL then you don't get a SOA nor a TTL. There is no answer for you to negative-cache. If instead you get a NXDOMAIN than you do get a SOA, with a TTL. You will negative-cache that response for the duration of the TTL. – Celada Jul 20 at 20:37

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.