How to add/change Nameservers in WHM

This is how you add or change a nameserver using as your registrar and WHM/cPanel. At the time of writing, I am using WHM 11.24.2 on a machine running CentOS 5.3.
Create a new nameserver in
  1. Log into
  2. Click on ‘Domain Manager’ and then the domain to which you will be adding a name server.
  3. At the bottom-left corner of that page, you will see a box like this one:
    add nameserver in godaddy
    Click the ‘add’ link.
  4. Define the nameserver like this:
    Define Name Server in GoDaddy
  5. Click OK.
  6. Repeat these steps for all the nameservers you will be defining.  Typically, you need to create at least two, and they can share the same IP address.
Prepare the server
  1. ssh into the server and su to root.
  2. add the nameserver ip addresses in /etc/nameserverips in the following format:

Configure WHM

  1. Log in to WHM as root.
  2. Click on ‘Server Configuration’ > ‘Basic cPanel/WHM Setup’.
  3. Modify the ‘Primary Nameserver’ and ‘Secondary Nameserver’ fields to match the new nameserver.
    primary and secondary nameservers in whm
  4. Click on ‘Add an A entry for this nameserver’ on each of the new nameservers, enter the correct IP address in the popup, and click ‘Add Entry’.
  5. Select a nameserver from ‘Service Configuration’ > ‘Nameserver Selection’.  Bind is pretty much standard, but as long as the nameserver is not Disabled, you should be fine.

Modify Resellers’ Nameservers

  1. Go to ‘Resellers’ > ‘Reseller Center’.
  2. Under the ‘Reseller Modifications’ section, select a reseller, then click ‘Edit Privileges/Nameservers’.
  3. At the bottom of the page, enter in the new name servers.
    Reseller Nameserver
  4. Click ‘Save All Settings’.

If you need me to expand one of these sections, please comment.

3 thoughts on “How to add/change Nameservers in WHM

  1. Hello,

    To be sure, in configuration WHM .4

    The IP Address is the one of the server in WHM, in your example ?


  2. That is correct. Your name servers can have different ip addresses than websites on the same server, but in this example, they share the same IP address.

Leave a Reply

Your email address will not be published. Required fields are marked *