Questions? Feedback? powered by Olark live chat software
Knowledgebase
Author Avatar

Setting cPanel Nameservers

Written by: on 23 April 2013 09:26 AM 23 April 2013 09:26 AM

Setting up own private nameservers on a cPanel server has many benefits. Follow quick guidelines to set it yourself.

When you setup a new cPanel VPS, you'll be sent an email with two IPs in it. Initially your VPS will only have one IP address assigned. You need to add your second IP address to your cPanel installation, login to WHM -> IP Functions -> Add a New IP Address

Once that is done, you need to setup your name servers. Firstly, login to your domain registrar and create the name servers (or hosts), ns1.yourdomain.com and ns2.yourdomain.com. This is not the same as simply associating name servers with your domain, so if you're unsure how to do this you may need to ask your registrar. For example in NetRegistry at the time of writing this support page the option is under the 'Domain Name Administration' and is called 'Domain hosts'. Alternatively VPSBlocks offers our initial cPanel setup which includes doing this for you as well as other cPanel setup tasks for a fee of $20.

Once you have created your name servers at the registrar, you need to setup the name servers in cPanel. To do this, login to WHM -> Server Configuration -> Basic cPanel & WHM Setup. Scroll down to the bottom and enter the name servers ns1.yourdomain.com and ns2.yourdomain.com. Click 'Save Changes'. Then you need to Assign an IP address to each, and then Add an A entry for each.

You can also manually set these IPs by doing the following, login to SSH (for help click here):

>> From the shell you can change it with the below mentioned process
#vi /etc/nameserverips
203.143.x.x=ns1.yourdomain.com
203.143.x.x=ns2.yourdomain.com
change it to the appropriate IP address and domain you created.
:wq!

>> Then access the file /var/cpanel/nameserverips.yaml
#vi /var/cpanel/nameserverips.yaml
Replace the appropriate nameservers and the IP address.

>> After that restart the service
#service named restart OR #/etc/init.d/named restart
#service cpanel restart OR #/etc/init.d/cpanel restart

Check for the changes in the Nameserver IPs of the WHM.
Thats it !!! Done.

Now your own name servers are setup and you can use them for any domains you wish to point to this VPS.

(0 vote(s))
Helpful
Not helpful