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!

What’s actually happening when the root nameserver redirects to the .com nameserver, on page 6?

Illustration of a resolver, represented by a box with a smiley face holding a magnifying glass, and a root nameserver, represented by a pink box with a smiley face, wearing a stack of three crowns

resolver: what’s the IP for example.com?
root nameserver: I am not concerned with petty details like that. Here’s the address of the .com nameserver
(this is an NS record)

The root nameserver can return two kinds of DNS records:

NS records: (in the Authority section)

com. 172800 NS a.gtld-servers.net 
com. 172800 NS b.gtld-servers.net

com. is the name
172800 is the TTL
NS is the type
b.gtld-servers.net is the value

glue records: (in the Additional section)

a.gtld-servers.net 86400 A 192.5.6.30 
b.gtld-servers.net 86400 A 192.33.14.30

a.gtld-servers.net is the name
86400 is the TTL
A is the type
192.33.14.30 is the value

The NS record gives you the domain name of the server to talk to next, but not its IP address.

resolver: But I need the IP for a.gtld-servers.net to communicate with it! is there a glue record?

2 ways the resolver gets the IP address

  1. If it sees a glue record for a.gtld-servers.net, the resolver will use that IP
  2. otherwise, it’ll start a whole separate DNS lookup for a.gtld-servers.net

glue records help resolvers avoid infinite loops

without a glue record for a.gtld-servers.net: disaster!

resolver: what’s the IP for a.gtld-servers.net?
root nameserver: You should ask a.gtld-servers.net

terminology note

NS records are DNS records with type “NS”.

Also, an “A record” means “record with type A”, “MX record” means “record with type MX”, etc.

(confusingly, this is not true for glue records, glue records have type A or AAAA. It’s weird, I know.)

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)