How do you make your own DNS?

Posted February 1, 2016 9.3k views


So I am thinking of starting a small web host and would like to use a Digital Ocean VPS to run it. The thing I am getting stuck on is how will I setup my DNS servers so if a customer has his own domain he can use it? Do I just make ns1.(mydomain).com and ns2.(mydomain).com, and just point those to my VPS’s IP address??


F.Y.I the control panel I will be using is vestaCP.

1 comment
  • Hello, I’m also trying to setup my own dns with cpanel but can’t get it running.
    I did the following:

    1. I added hostnames with the 3 ips same as D.O.



    2. I put the new nameserver to the same domain.

    3. I added the nameserver to cpanel.

    And still not working…
    this is the domain with own nameserver:

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

There are a few steps in that process.

  1. You’d need to register the private name servers with your domain registrar. Every registrar handles this differently. This is also referred to as the GLUE records.
  2. You would then point your domain to those name servers
  3. You would need to add the domain to your DNS server (VestaCP) and make sure there are A records for the ns1 and ns2 subdomains.

Once all three steps are complete, you could have other sites hosted on your VestaCP system and simply have the domains pointed to your name servers and everything should magically work.

Happy coding,

Jon Schwenn
Platform Support Specialist

  • I use Name Cheap as my domain registrar. So would I use your guys DNS service or will I keep it with Name Cheap and setup the DNS with Name Cheap?

    Also what IP’s will I forward the name servers too?

    • If you want VestaCP to control the DNS zones, then the DigitalOcean DNS feature would not be used at all. What I was describing was using the Droplet as the DNS server. You can use the Droplet’s IP address for ns1 and ns2. It’s not redundant, but allows the control panel to control the DNS zones. If Namecheap complains that the IP addresses are the same, technically you can add a secondary IP with DigitalOcean’s Floating IP feature.

      This is a link to Namecheap’s documentation. It looks like they call the setting “register personal nameservers”.