Empty AAAA DNS Record with long TTL?

Joel K asked:

I pay for a DNS service based on queries per second.

We are not using IPv6, but a large number of queries (that I pay for) are coming in for AAAA records. I understand that most DNS stacks will now ask for A and AAAAs at the same time, and that I can’t change that.

What I would like to do is put something in the AAAA records with a long TTL.
(decreasing my hit rate)

Is there anything I can put? Null? The equivalent IPv4 Address?

Any guidance would be appreciated.

My answer:

In BIND 9 the “minimum” value in the SOA record expresses how long an NXDOMAIN response may be cached. This is the last value in the following example:

example.com.    IN    SOA   ns.example.com. hostmaster.example.com. (
                              2003080800 ; sn = serial number
                              172800     ; ref = refresh = 2d
                              900        ; ret = update retry = 15m
                              1209600    ; ex = expiry = 2w
                              3600       ; min = minimum = 1h

Change it to something a bit longer, say 86400 (1 day) or even 604800 (1 week).

Keep in mind that this applies to negative caching of any nonexistent record, not just AAAA records, so you’ll need to take additional steps when adding new records of any type (reduce this value, wait, add the new record, increase this value again).

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.