About DNS

September 5, 2013 4.6k views
For last couple of days I have been playing with DO's VPS and I'm satisfied. I was just wondering about one thing, DNS. I am going to install zpanel (if you are not familiar with zpanel, then just think about cpanel or plesk or directadmin etc.). And I'll add a domain to one droplet and will configure the name servers both in my domain control panel and in DO's DNS server. So, instead of using DO's ns name, ns1.digitalocean.com ns2.digitalocean.com ns3.digitalocean.com I'll use ns1.mydomain.com ns2.mydomain.com ns3.mydomain.com But I'm not going to setup 3 separate droplets for the dns, I'll use the IPs of DO's like, 198.199.120.125 141.0.170.89 198.199.95.114 Now, when I add a new domain (xyz.com) through zpanel and for domain NS if I use ns1.mydomain.com ns2.mydomain.com ns3.mydomain.com then it should work perfectly. So am I right or did I miss something? Thank you.
1 comment
  • I am wondering what the DNS option is for under droplet settings, I thought I can put a new domain here it will be registered automatically, but I can't access the domain from google domain servers.

    1. do i have to pay extra to get it activated with .com domain?
    2. If digitalocean is not a registrar please do let me know to register this domain for my self some where else.

    thank you,

4 Answers
Since you are going to use our DNS services for resolving the domains you would also need to add those domains to the DigitalOcean domain manager:

https://www.digitalocean.com/domains

Then it should work. =]
If you're going to use DigitalOcean's DNS service's IP addresses, you should add them to the DNS manager in your account control panel in order for the domain to resolve.
Hmm, I have tested in all the possible ways to solve this matter by myself. Here is the solution:

# If you want fully branded name server, then you need at least two NS. And for DNS my personal preference is either BIND-9 or PowerDNS, but it's up to you. Now, you can use a single droplet to configure two NS, but it might happen that (and it will happen!) at a certain time that droplet goes offline. So, all your sites will go offline too. So, you should use at least two different droplets.

# If you want to use your own NS record but not want to make things complicated, then you can use DO's IP and create your own NS record. For that, first create three Child NS or three Glue records using the three IPs which I have already mentioned in the original post. Now, create three A records just like what you have done in the previous steps. So,

ns1.mydomain.com => 198.199.120.125
ns2.mydomain.com => 141.0.170.89
ns3.mydomain.com => 198.199.95.114

in both A records and Child NS or Glue records.

Now, another A record like:
@.mydomain.com => [your droplet's IP]

Login to your DO a/c. From DNS, add a domain. There create these:

A record:
@.mydomain.com. => [your droplet IP]
ns1.mydomain.com. => 198.199.120.125
ns2.mydomain.com. => 141.0.170.89
ns3.mydomain.com. => 198.199.95.114

NS record:
ns1.mydomain.com.
ns2.mydomain.com.
ns3.mydomain.com.

Everything's finish now! Now, if you want to install cPanel, zpanel or whatever you want, you can add any new domain from your control panel. for newdomain.com, you will have to login in your domain's control panel (you do not need to add any further domain using DO's DNS!) and add:

A record:
@.mydomain.com. => [your droplet IP]

NS:
ns1.mydomain.com
ns2.mydomain.com
ns3.mydomain.com

Even if you create a new droplet, you don't need to add another domain for that droplet inside DO's DNS if you want to use cpanel etc. You just add the NS like newdomain.com, and one important thing, here in A record @.newdomain2.com => [your new droplet IP].

Even DO's new customers can use your NS from now on ;)

Have fun!
Have another answer? Share your knowledge.