Table of Contents

Name Server Selection

cPanel offers you a couple options of name servers to choose from. You can either log into the WHM and choose between these options or do it from the CLI. Both methods are explained below.

Your name server options

cPanel offerings three different nameservers options. If you want to see the advantages and disadvantages of each you should log into the WHM and view the 'Nameserver Selection' area where these are outlined. As of May 25, 2014 the three options to choose from are Bind, MyDNS, or NSD. Bind is currently the default nameserver installed by cPanel and it's the server we recommend for dedicated server installs. However if your running on a low memory virtual server we prefer NSD as it uses less memory. If you do not need a nameserver on your server we highly recommend that you select the disabled option!

Selecting a nameserver through the CLI

cPanel has provided a script that can be run via the command line that will allow you to choose your nameserver. You need to be logged into the server as root via the console or through SSH.

To get a list of available nameserver types you can simply run the script with no options like so.

root@server1 [/usr/local/cpanel/bin]# /usr/local/cpanel/scripts/setupnameserver
setupnameserver [options] [nameserver type]
 
    Options:
      --help       Brief help message
      --force      Rerun configuration routines even if the selected
                   nameserver type is already configured
      --current    Show the currently selected nameserver type
 
 
    Nameserver Types:
      bind         Suggested.  Functions as both authoritative
                   and caching nameserver.
      nsd          Lower memory.  Functions only as authoritative
                   nameserver.
      mydns        Uses MySql as backend.  Functions only as authoritative
                   nameserver.
      disabled     Disable the local nameserver.

Once you have made a decision you should run the script with any options you want to pass and then the nameserver type. The example below shows how to choose bind as your nameserver

root@server1 [/usr/local/cpanel/bin]# /usr/local/cpanel/scripts/setupnameserver bind
Setting name server to bind in /var/cpanel/cpanel.config
 
Halting NSD
 
Disabling NSD in init system
 
Halting MyDNS
 
Disabling MyDNS in init system
 
Uninstalling unused nameservers
 
Calling RPM installer object
[20140425.151546]   No new RPMS needed for install
 
Checking that BIND is installed
 
Enabling BIND in init system
 
Setting up rndc configuration
Named looks down but should be up.  Attempting restart...
Entropy santity check: /dev/urandom and /dev/random exist
Checking in /etc/named.conf to rcs system
The rndc key has been fixed successfully!
 
Starting BIND
 
Nameserver conversion complete

Selecting a nameserver through the WHM

In order to do this you must have root access into the WHM. Start by logging into the WHM, on the left hand side scroll down to the 'Service Configuration' section. Next bind the 'Nameserver Selection' link and click it. From there you will see a list of available nameservers. Your current nameserver will be selected by default. Select your new nameserver option and click save. It's as simple as that!