Creating DNS servers in WHM

Expertise level: Easy

Why your own DNS servers?

Your own DNS servers in your company name ( will give you better identity. This will also allow you to configure and manage the DNS zones on your own dedicated server, which is the most convenient way. 

The procedure

( is used in the procedure as an example, use your domain name instead)

  1. Register the nameservers and with your domain name registrar using two different IP addresses on your server. (You may contact your registrar for the procedure to complete that step).
  2. Once your nameservers are registered, log on to your WHM control panel as root.
  3. Click on "Server Configuration".
  4. Click on "Basic cPanel & WHM Setup".
  5. Scroll down to the bottom, into the "Nameserver 1" field, enter the primary NS that you have registered (
  6. Click on Assign IP Address
  7. Click on "Add an A entry for this nameserver" and confirm by clicking on "Add Entry".
  8. Into the "Nameserver 2" field, enter the name of the secondary NS that you have registered (
  9. Click on Assign IP address.
  10. Click on "Add an A entry for this nameserver" and confirm by clicking on "Add Entry". 


If the IP addresses to your nameservers are not assigning correctly, you can then edit the file manually:

  • Connect to your server as root in a SSH session.
  • Edit the file /etc/nameserverips
  • Type in the correct IP addresses in a manner similar to this:


  • Restart named service: /etc/init.d/named restart
  • Make sure to add the A entries corresponding to ns1 and ns2 with the correct IP on your domain's DNS zone. 

Refer to the following screen captures:






Article is closed for comments.
Powered by Zendesk