Knowledgebase
Knowledgebase
Set Up Nameservers in a CP & WHM Environment
Posted by Will Kruss on 26 May 2016 09:22 PM
Know how to set up nameservers on your cPanel & WHM Environment server. An excellent easy guide for self learners.
 
Setting up your own private nameservers on a cPanel server has many benefits, most importantly enabling all of cPanel’s built in DNS tools which can make DNS changes much easier.

This guide will show you how to set up and register new private nameservers on a cPanel server using the WHM (Web Host Manager) interface.

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 example.com. Our server is called host.example.com and we will be setting up ns1.example.com and ns2.example.com.

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
  • Pointing domains at those new nameservers.

Step 1: Configuring the Server

When you start the WHM Setup Wizard you will get to a page that shows you your existing IP address. You will have been sent an email with a second IP address, and you should enter that one to add this second IP to your VPS. The following page asks about name servers. You need to enter the name servers you wish to use and associate an IP with each of them e.g.:

ns1.example.com 203.143.x.x
ns2.example.com 203.143.x.x

You should check the box to add an entry for each of them in the DNS server. You can also add an entry in the DNS for the hostname of the VPS.

Go to Step 2

If you have not done this during the setup please follow the below, although this may not change all instances of the incorrect details and may require manual modifications of files on your VPS.

Log in to your server’s WHM interface and find the navigation section on the left called Basic cPanel & WHM Setup, under Server Configuration. This is the first item on the left navigation bar.

At the bottom, you will find the Nameservers section.

WHM Nameserver Setup

 

Enter Name Server 1: ns1.yourdomain.com

Enter Name Server 2: ns2.yourdomain.com

Below you will see 'Add A Entries for Name servers & Hostname'. Check the box next to that and add the IP for each of the name servers.

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

 

Step 2: Registering Your Private Nameservers

The vast majority of registrars do not charge their customers any extra fee for registering nameservers as long as the main domain name itself has already been purchased.

If you registered the domain yourself:

If you are setting up nameservers for a domain name that you own, which you also purchased yourself at a domain registrar, you will need to login to your account at that same registrar and use their tool to register the new names.

For example, if you are setting up ns1.testdomain.com and ns2.testdomain.com, and you purchased testdomain.com from GoDaddy, you would need to login to your GoDaddy account in order to register the new nameservers see: https://au.godaddy.com/help/creating-your-own-nameserver-registering-your-own-domain-hosts-12320 

Once you have found the tool/page you need at your registrar’s web site the registration itself is very straightforward. Most registrars use a simple form where you enter in the name of the nameserver you wish to create and the corresponding IP address.

Create two name servers:

  • ns1.yourdomain.com
  • ns2.yourdomain.com

Point them to the same IP address if that is allowed. If not, you will need to purchase an additional IP address first, see: http://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/18/0/how-do-i-add-another-ip-address

If VPSBlocks registered the domain for you:

If you are setting up nameservers for a domain and the domain was purchased as a part of your VPSBlocks account you will need to open a new help desk ticket with your request. We will create the name servers for you.

You are welcome to follow the steps described above to complete the server configuration and have us handle the nameserver registration.

 

Step 3: Pointing Your Domain(s) at Your New Nameservers

The final step in creating your own nameservers is to start using them by correctly pointing your domain(s). Log in to your registrar and set your domain so that it uses your new nameservers. For GoDaddy see: http://support.godaddy.com/help/article/664/setting-nameservers-for-your-domain-names

Please note that if you change a domain’s nameservers the domain will temporarily stop working while the new settings propagate throughout the entire internet. If downtime is a critical issue for your domain we recommend you make this during a weekend or late at night when traffic is likely to be low.

Now that your domain is pointing at your server’s nameservers you can use the DNS tools in the WHM and cPanel interfaces to modify your zone files!

When you load this screen for the first time you may see that two nameservers. You need to change these.
(10 vote(s))
Helpful
Not helpful