Linode Library Home
Linode Library RSS Feed
Home :: Web Applications :: Control Panels :: cPanel
Print View View Source

Set Up DNS Services on cPanel

Published: by

cPanel is a commercial web-based control panel for server systems. It can help ease the burden of common system administration tasks such as website creation, database deployment and management, and more. This guide will show you how to set up your cPanel server to serve DNS records. These instructions should be done through your root WHM interface.

Contents

Nameserver Selection

In your root WHM, under the Service Configuration section, click on "Nameserver Selection". You will be presented with this screen:

cPanel Nameserver selection screen.

You can choose from BIND or NSD; the advantages and disadvantages for each are displayed. If you are unfamiliar with either of them, BIND will be the easiest to work with.

Nameserver Records

To use your own nameservers (e.g. ns1.mydomain.com, ns2.mydomain.com), you'll need to create those entries at your registrar first. The process for adding those can vary based on which registrar you are using, so if you are unsure as to how to go about getting these entries set up, you should contact your registrar's support and ask them how to do so. You'll also need to add A records for your nameservers on your Linode within WHM. To do that, you'll want to log into your WHM as root then navigate to the DNS Functions section and click on Edit DNS Zone, which will present you with this page:

cPanel Edit DNS screen.

Simply click the domain you used when you set up your nameservers at your registrar and click the Edit button to get to the DNS Editor screen. On the DNS Editor screen, you will want to add A records for your nameservers. To do this, you will fill in the spaces at the bottom of the screen like so:

cPanel add NS entries.

Just make sure you use your own Linode's IP address. You can add more than two nameservers if you like.

Using Linode's DNS Manager as a Slave

When using your BIND install on cPanel as your master nameserver and the Linode DNS Manager as a slave, you will want to set all of the nameservers at your registrar. You should have a list like this:

To get your cPanel Linode ready as your master DNS server, you'll need to make a few additions/edits to your /etc/named.conf file.

You'll first want to find this line:

recursion no;

And change it to:

recursion yes;

After you make that edit, add these two sections under your recursion line:

allow-recursion {
     69.164.199.240;
     69.164.199.241;
     69.164.199.242;
     69.93.127.10;
     65.19.178.10;
     75.127.96.10;
     207.192.70.10;
     109.74.194.10;
 };

 allow-transfer {
     69.164.199.240;
     69.164.199.241;
     69.164.199.242;
     69.93.127.10;
     65.19.178.10;
     75.127.96.10;
     207.192.70.10;
     109.74.194.10;
 };

After your updates are complete, save and close the named.conf file. You'll then want to begin adding your domains to the Linode DNS Manager as slave zones.

  1. Log in to the Linode Manager and click on the DNS Manager tab.

  2. At the bottom, click on the "Add a domain zone" link.

  3. On the bottom right corner of the next page, click the link titled "I wanted a slave zone."

  4. On the slave zone page, you'll want to enter your domain name in the "Domain" box and your cPanel server's main IP address in the "Masters" box.

    Linode slave zone screen.
  5. Click the "Add a Slave Zone" button.

    Note

    Once you save your slave zone, you'll see a new text field titled "Domain Transfers". You can leave this empty.

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

Creative Commons License

This guide is licensed under a Creative Commons Attribution-NoDerivs 3.0 United States License.

Last edited by Sharon Campbell on Friday, August 16th, 2013 (r3613).