Skip to Content
Navigation:

A stick figure smiling

Here's a preview from my zine, How DNS Works! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript".

browse more comics! get the zine!
read the transcript!

Here’s a problem I’ve had many times

Illustration of a stick figure with curly hair and a distressed expression.
Person’s thought bubble: I set up my new domain, everything looks good, but it’s not working?!?!

I finally learned last year that my problem was “negative caching”

Same person, now smiling: now I never have this problem anymore!

resolvers cache negative results

Illustration of a resolver, represented by a box with a smiley face holding a magnifying glass, and an authoritative nameserver, represented by a box with a smiley face wearing a crown.

resolver: what’s the IP for bees.jvns.ca?
authoritative nameserver: I don’t have any records for that!
resolver (thought bubble) caching: no A records for bees. jvns.ca

the TTL for caching negative results comes from the SOA record

example.com. 3600 IN SOA ns.icann.org. noc.dns.icann.org. 2021120741 7200 3600 1209600 3600

it’s the smaller of the first number and the last number (in this case 3600 seconds)

what you need to know about SOA records

  1. they control the negative caching TTL
  2. you can’t change them (unless you run your own authoritative nameserver)
  3. how to find yours: dig SOA yourdomain.com

how to avoid this problem

Just make sure not to visit your domain before creating its DNS record!

That’s it! (if you really want more details, see RFC 2308)

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)