SOLVED Hosting Nameserver on my server

david-au

Registered
Mar 25, 2022
2
0
1
Australia
cPanel Access Level
Website Owner
I need some help understanding how it works when I have a DNS server configured via cPanel/WHM. I read the cPanel documentation, but still some questions.
I set the nameservers on my server to ns1.mydomain.com and ns2.mydomain.com. I have PowerDNS enable. I have the latest cPanel version installed on Ubuntu 20.04.

What do I have to set at my register in the DNS settings? I have the option of giving nameservers, or DNS information:

1) Do I enter ns1.mydomain.com and ns2.mydomain.com as the nameservers at my register? How will ns1.mydomain.com be resolved? Will PowerDNS some how add my nameservers to some list so it can be found?

2) Or, do I enter some DNS data at my register so my nameservers can be found? For example, do I add two A records pointing "ns1.mydomain.com" and "ns2.mydomain.com" to the IP address of my server?
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
13,250
2,085
363
cPanel Access Level
Root Administrator
Hey there! When you create the nameservers in the initial WHM configuration, that just tells the system what NS records to create in future DNS zones. It doesn't create the DNS records or tell any external service that these nameservers exist.

You'll need to contact the registrar and let them know you have a pair of custom nameservers. We have a list of popular registrars here, so you may find this helpful:


If your provider isn't on that list, a quick message to them or a search of their documentation will show how to do this as every registrar has that feature available.

You will also need A records in the main DNS zone as well, so the nameservers respond properly on the internet. For example, if you setup ns1 and ns2.domain.com you'd want to add two A records in the DNS Zone that look like this:

ns1 IN A x.x.x.x
ns2 IN A x.x.x.x

where the "x.x.x.x" represents your IP address.

Let me know if that helps!