How to set up private nameserver for Linux server

Most users will want to use a domain name they already own, often the same domain name that is being used for the hostname of the server that will be running the private nameservers.

For this example, we will use a fake domain called Our server is called and we will be setting up and

There are three parts to setting your private nameservers: Configuring the server to accept and process the DNS requests, registering your your new nameservers at the registrar who controls the domain name, and finally pointing domains at those new nameservers.

This article will guide on how to create private nameserver for Linux server.

For Linux server installed cPanel:

1. Log in to your WHM with URL : yourserverIPaddress/whm and find the navigation section on the left called Basic cPanel & WHM Setup, at the bottom, you will find the Nameservers section.

2. When you load this screen for the first time you may see that is two nameservers, using the same domain name as the server’s hostname are already in place. You may change the hostname and assign with the IP address for the nameserver.

3. Key in the new nameserver such as and assign the IP address. You need to have at least two nameserver names configured, so repeat this step to create your second nameserver.

4. When finished assigning IP addresses, make sure to click Save Changes (3).

5. If the domain name for example is yet to add in WHM , you may need to create a new cpanel account or add the DNS zone for the to enable the DNS for the domain name.

6. To add the DNS in WHM , go to DNS function and click on Add a DNS Zone.


7. Key in and add it with your server IP, then click on Add Zone.

8. Once the DNS zone successfully added, go to Edit DNS Zone , select from the list , add below A record for your nameserver under Add New Entries:


ns1: A record : your nameserver IP address

ns2: A record : your nameserver IP address

9. Click on Save to save the setting.

Note: If the domain name for example is using third party DNS which mean not hosting with Exabytes , you may need to update the A record at for and to your servers IP addresses assigned on step 3 at the current hosted DNS zone .

In order to able to use the private nameserver, may refer to below on How To Register Nameserver and Update Nameserver:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.