Before You Begin

Before you start setting up your nameservers in WHM, you need to make sure that the correct details have been configured with your domain registrar. Each registrar handles the setting up of private nameservers differently so you should contact them to determine the method they use. Ssome let you control the setup from your domain control panel, however some require their administrators to create the nameserver entries for.

The most important point to make when contacting your registrar is that you wish to create private nameserver details to use with your own hosting server(some refer to these as child nameservers). Occasionally you will strike level 1 support staff who do not fully understand what you wish to do and may provide you incorrect instruction unless you specify this.

Once you know how they do it, you just need to set up the nameservers in their system as below:

  1. Enter the names you would like to use; e.g. ns1.yourdomain.com and ns2.yourdomain.com
  2. Enter the corresponding ip addresses details from your server that you wish to use.

1. Setup The Nameservers In WHM

In WHM, navigate to the left hand menu option “Basic cPanel/WHM Setup” and do the following:

  1. Set the Primary Nameserver to ns1.yourdomain.com.
  2. Then click Assign IP Address.
  3. Repeat this for the Secondary Nameserver section, using ns2.yourdomain.com.
  4. On the bottom of the page, click Save.

Note: the IP addresses will most likely not get set correctly so we will rectify this by changing the nameserverip file via SSH.

2. Modify The Nameserver IPs Via SSH

SSH into your server as root and open the following file:

nano /etc/nameserverips

You should edit the file to look something like the example below:

IP1=ns1.yourdomain.com
IP2=ns2.yourdomain.com

Save the file and exit the editor.

3. Complete the WHM Nameserver Setup

In WHM, navigate back to the left hand menu option “Basic cPanel/WHM Setup” and perform the following steps:

  1. Double check the primary nameserver field contains your ns1.yourdomain.com entry;
  2. Click “Assign IP Address” which should now show you the correct IP address;
  3. Click “Add an A entry for this nameserver”;
  4. Repeat this for the Secondary Nameserver section using ns2.yourdomain.com.

On the bottom of the page, click Save. If you now select the left hand menu option “Manage Nameserver IPs”, you should see the correct nameserver details with the corresponding ips.

4. Restart The DNS Service

You should now just be able to restart the DNS service by doing the following:

  1. Navigate to the “Restart Services” section in the left hand men;
  2. Select “DNS Server (BIND/NSD)”
  3. Hit the yes button in the right hand frame.

Done!…Hopefully you now have working nameservers attached to your own domain.

Comments are closed.