Private Nameserver setup for VPS Hosting or Dedicated Server
You will have to decide what nameservers you want to set on your VPS / Dedicated Server / Reseller Hosting Account. If you have the domain “mydomain.com” then you can make the nameservers ns1.domain.com and ns2.domain.com.
Open http://IP/whm then go to IP Functions >> show IP address usage & Check free IP over there or choose your primary and secondary IP Address.
You will need to register nameservers first from registrar end. Login to your registrar’s domain control panel and register the name server or ask them to register the private name server for your domain.
-ns1.domain.com - the Default IP Of your server -ns2.domain.com - Secondary IP or free IP
Exception : In case if you have just one domain and you have set that name server for your other server and you want to use ns3.domain.com and ns4.domain.com name server for this server then you will have to set the dns for it from the dns zone file of domain.com if you have WHM then you can go to the server where this domain is resolving then open WHM >> Edit a DNS zone >> select domain from the list >> Edit at the end just add this line
ns3 In A First_IP ns4 In A Second_IP
or if you are using shell then you can simply append following lines there in
# vi /var/named/domain.com.db ns3 IN A First_IP ns4 IN A Second_IP
Save the file.
# service named reload # rndc reload domain.com
http://IP/whm >> Basic cPanel/WHM Setup
Scroll down to Primary Nameserver ns1.domain.com & Click on “Assign IP address” and then “Add an A entry for this name server“
Similarly for Secondary Nameserver ns2.domain.com Click on “Assign IP address ” and then “Add an A entry for this name server“
Once all done you can check if your nameservers have started resolving or not from
Once you see the assigned IP address there then it means that the name server for your server are set.
Create new account from your WHM and now you will just need to point your site from your registrar end to these nameservers ns1.domain.com and ns2.domain.com if you want to resolve your site from this server.