0

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?

3
  • Just as a side note to fixing your other issues it's worth saying that there are no good reasons for doing this the way you're trying to do it. At least one of your DNS servers should be on a separate machine. You are setting yourself up for failure. Just so you know. There are third party DNS hosting services available.
    – Caleb
    Oct 15, 2010 at 17:53
  • Could you explain why this is not recommended? Also, can you suggest a good dns hosting company which provides hosting private nameservers? Oct 16, 2010 at 2:26
  • Your question makes it sound as though both ns1 and ns2.example.com resolve to different IP addresses, which are configured on one server. This means if the server fails, both nameservers (and your site) fail. If this is not the case, and you have two virtual servers running a nameserver each, this is better. Still, there is little need to run your own DNS servers for most normal use as most providers let you configure your own DNS entries anyway. We've had good experiences with rollernet.us/services/dns.php for backup DNS as we don't want to rely on GoDaddy (or whoever) exclusively. Oct 16, 2010 at 2:58

2 Answers 2

1

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.

0

Do i need to setup A records for ns1.example.com and ns2.example.com?

Yes.

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

Read http://en.wikipedia.org/wiki/Domain_Name_System#Circular_dependencies_and_glue_records

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .