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 1.2.3.4
, and this DNS server advertises the following (simplified) zone:
@ NS ns.domain.com.
@ A 1.2.3.4
ns A 1.2.3.4
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?