Search The Hostwinds Guides Knowledge Base

CentOS Web Panel Custom DNS

Share This Article

CentOS Web Panel (CWP) offers a couple of different methods of managing DNS within its settings. The easier option is FreeDNS, but using FreeDNS does rely on externally managed DNS. Although this is not necessarily a bad thing, some may wish to allow the CWP server to directly manage DNS. In this guide, we will discuss CentOS Web Panel Custom DNS settings.

This guide covers an advanced setup process and requires at least a small degree of understanding of DNS and how it works.

Prerequisites For Custom DNS

This guide is going to assume the following prerequisites as having been completed:

  1. CentOS Web Panel installed and the basic setup complete
  2. Private Nameservers: For domains registered with Hostwinds, use our Private Nameserver Tool to create them. Otherwise, seek assistance from your registrar to create them
  3. Hostname set to an FQDN (fully-qualified domain name, this can use a domain you plan to set up in your DNS afterward)
  4. rDNS Record set (if you plan to use email with this setup). Use the Manage IPs option from the cloud control portal to set your primary IP rDNS.

Enabling Your Private Nameservers

The first step to any nameserver host creation is enabling the nameserver application. Luckily, CWP sets this up for us. This section will cover implementing our private nameservers that we setup before starting.

Step 1: From the CentOS Web Panel Dashboard, Click the DNS Functions Dropdown Menu drop down menu, then click the Edit Nameservers IPs link link. This will bring you to the Edit Nameservers page. The default nameservers for CentOS Web Panel will be listed with IP Addresses set to 127.0.0.1.

Edit Nameservers Page

Step 3: Modify the nameservers here to your private nameservers you created with your domain name registrar. Then, add the IP Address of your Hostwinds VPS in both IP address boxes. Finally, click Save Changes to finalize these nameservers. Leaving the two check boxes checked will allow the DNS zone and server to perform the necessary tasks required to enable the changes.

Nameserver, IP And save changes

When you save the changes, a success message will appear. Then, assuming you had the private nameservers setup, you should see your new nameserver records resolving correctly.

Nameserver Edit Save Changes Success Page

Confirming the Nameserver Functionality

After setting your nameservers within CentOS Web Panel, the standard DNS delays will apply. After you have waited to ensure DNS propagation completed, you can perform a couple of tests to confirm your settings.

Step 1: Click the DNS Functions Drop Down drop down, then click on the List DNS Zones link link. This will show you all active DNS Zones, including the primary zone and nameserver zones for the domain setup in the first part of this guide. Do not delete any of the standard zones, as they are required for core functionality.

List DNS Zones page

Step 2: Click the Check Records button located next to your newly added zone. The results for this check will appear on the right side of the page.

Domain Checker results panel

You may notice that your listed nameservers in the above results still show up as the default CWP nameservers. We will fix that next by modifying your domain zone Start of Authority (SOA) record.

Modifying Your SOA Records

The Start of Authority (SOA) record tells the internet what DNS Nameserver holds the top priority for your domain. Usually, this is the to be set as your primary nameserver (ie ns1.yourdomain.com). CentOS Web Panel, however, creates new DNS Zones using its global default SOA. This means that the first DNS Zone created will have its SOA set to ns1.centos-webpanel.com. This section will discuss how to fix that.

Step 1: While still browsing the List DNS Zones page from the previous step, click Edit Records on the row containing your new DNS Zone. This brings you to the Zone Editor page for this zone. As you can see, there will be three locations within the page

DNS Records List DNS Zone Page

Step 2: Modify the record listed in the MNAME box shown within the SOA Parameters panel. You will set this to the ns1 version of the nameservers you created. Click Update SOA after modifying this record to commit the changes. A Success! notification will appear in the top right corner.

Success! The Record is Saved

Step 3: Use the edit button next to the NS records below to change the records to your ns1 and ns2 nameservers.

Edit Buttons

Clicking edit changes the record modification box above the User DNS Records panel. Enter the nameservers you plan to use here. Click Add NS Record to commit the change.

If you do not include the final period (.) at the end of your nameserver entry, you will receive an invalid URL error when attempting to commit the changes. Be sure to include the final period (.)

Edit NS Record panel

Repeat the last process for the second nameserver record. Your nameservers will then be set to the desired nameservers.

As always, remember that DNS changes can take up to 24 hours to fully propagate. If it does not immediately update, please wait the recommended 24 hours before assuming your settings are incorrect.

Congratulations! You have successfully setup custom nameservers on your CentOS Web Panel server. Don’t forget to add the A Name record for the hostname you gave your server, if it needs to be created.

Related Articles