how to find out the negative result cache time for a DNS domain

 When setting up a new DNS record for a service, one often ends up with a negative response (NXDOMAIN) cached in a test client's DNS chain.  This then continues to have effect until it expires.  

But when does it expire? It depends on the default negative cache time for the realm (domain).  One way to query this is with dig.  I think the last value in the SOA record is the cache time for negative results.

$ dig nx.coulddobetter.at
[..]
;; AUTHORITY SECTION:
coulddobetter.at.       1800    IN      SOA     ns1.gandi.net. hostmaster.gandi.net. 1641226106 10800 3600 604800 10800

The final 10800, highlighted above in green bold, is the cache time for negative results for coulddobetter.at. It's in seconds, so 3 hours here.

I don't think it's necessary to query a non-existent domain to get the SOA record, but in this case I did.

The next question is: can gandi customers set their negative results cache time, or are we stuck with 3h?  It's a long time to wait, to see a new DNS name light up.

Comments

Popular posts from this blog

the persistent idiocy of "privileged ports" on Unix

google is giving more and more 500 errors

7 minute workout: a straightforward audio recording (and two broken google web sites)