Setup private nameservers

domain-registrargodaddynameserver

I have registered a domain name example.com from godaddy recently and want to run two nameservers ns1.example.com and ns2.example.com on it. I have followed the process mentioned in godaddy but, got stuck.

I have two ip addresses assigned to my vps from ip1 and ip2. From gaddy, i have added two host ns1 -> ip1 and ns2 -> ip2.

Now, godaddy has confirmed that ns1.example.com and ns2.example.com are registered, so when i do a whois, they show up nicely.

whois ns1.example.com
whois ns2.example.com

Both give proper answers. it shows that both nameserver addresses are registered in the registrars and displays the ip addresses properly.

But, the step I am confused now is, when I do a dig, it fails to resolve to any ip address

dig ns1.example.com
dig ns2.example.com

Both fails. I have a zone defined in bind for example.com. Do i need to setup A records for ns1.example.com and ns2.example.com?

Why does, registering the nameserver addresses and adding host info in godaddy doesn't work?

Best Answer

You need to have your ns1.example.com and ns2.example.com addresses registered with fixed IP's at some registrar that supports registering name servers. It sounds like you have finished this step. These registrations are special in that they are self resolving, the IP address is returned along with the name of the name server specifically to break any circular dependencies.

However that is not the same as trying to run a dig on those addresses because the lookup system for them is different. If you would like them to resolve as normal host names in addition to being name-servers, you may add A records for them like you would any other host names in your local DNS server, but is not strictly necessary unless you actually use those as host names.

dig example.com @ns1.example.com should tell you if your DNS server is returning a records for your domain. dig ns1.example.com @ns1.example.com will tell you if your DNS system is returning records for that host name. You can also use the IP of your server after the @ to test the last step if you don't have the first one done.

Related Topic