Reading this question got me thinking:

I want to host a DNS server for my home website from my home (which has a static IP) what do I need to do?

I'm comfortable with DNS and how it works, but this question lead me down a path I've not considered before.

Suppose I host a DNS server for my own domain (example.com) at, and this DNS server advertises the following (simplified) zone:

@   NS ns.domain.com.
@   A
ns  A

I then subsequently register ns.example.com as example.com's name server with my registrar.

We can't resolve the address of ns.example.com without first knowing who is responsible for example.com.

Once we know that ns.example.com is the name server for example.com won't we get stuck? Surely there is no way to contact ns.example.com because the A record identifying their IP address is held by that same server...?

Presumably there is a step that I'm missing in the lookup...

Having read this, my understanding is confirmed but I'm still left puzzled...

It looks like this is possible, as google.com appears to be configured this way (as outlined in the linked article).

Isn't there a step missing between 5 and 6?

Step 5: [...] The .com gTLD server responds with a list of all of google.com’s NS records. In this case Google has four name servers, “ns1.google.com” to “ns4.google.com.”

Step 6: Finally, the DNS resolver queries one of Google’s name server for the IP of “www.google.com.”

... yes, but we need to know the IP of one of these nameservers to query them, effectively swapping a www.google.com query out for an interim ns1.google.com query.

What am I missing here?


In this situation, the parent zone has a copy of the relevant A/AAAA records. When you query the .com zone for NS records, the server includes these "glue" records in the reply's additional section.

The root zone (publicly downloadable) has many such delegations with glue records:

lt.             172800  IN  NS      a.tld.lt.
lt.             172800  IN  NS      b.tld.lt.
a.tld.lt.       172800  IN  A
b.tld.lt.       172800  IN  A
b.tld.lt.       172800  IN  AAAA    2001:678:19:0:0:0:0:1

If you try to look up the NS records using dig lt. ns @a.root-servers.net, you will see the same addresses under "ADDITIONAL SECTION".

  • Thanks! You jogged my memory (Glue records)... I did know this once, but I've never done anything with them. – Attie Jun 2 '17 at 14:03

Step 5 on that article says:

[...] The .com gTLD server does not have the IP addresses for google.com, but it knows the location of google.com’s name servers. The .com gTLD server responds with a list of all of google.com’s NS records.

If I'm not wrong, although the .com gTLD server does not have records for the IP addresses for google.com, knowing the location of google.com's name server it can query the IP addresses and respond with them.

Perhaps doing some experimentation with dig using +trace and +norecurse in several steps can clarify what's going on.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.