Using cPanel/WHM with DO - I would like DNS management to be done by cPanel/WHM

November 9, 2016 2.2k views
DNS CentOS
  • domain is hosted by godaddy
  • I have set the hostname ns1 and ns2 to the IP address and floating IP of my droplet
  • I have updated these changes in WHM

I still have no luck. one of my clients' website is not accessible unless I add it to DO's DNS.

3 Answers

In order for you to manage your domains in cPanel/WHM you cannot use the DigitalOcean DNS servers. cPanel/WHM includes a fully functional and integrated DNS server of it's own. Instead what you'll want to do:

1.) It is recommended to have a secondary DNS server, your cPanel/WHM server can act as your primary and cPanel offers free DNS-Only licenses for a lightweight version for use on your secondary server(s).

Note: while it's not recommended, some registrars may allow you to create your two nameservers with the same IP address. It may also be possible (I have not tested this) to use your main ipv4 address and a floating IP for the same effect.

2.) With your domain registar, GoDaddy in this case, you will want to register new nameservers by creating nameserver glue records. You'll create an ns1.yourdomain.com and ns2.yourdomain.com and point them to your droplet's IP addresses.

Now once the new registrations propagate (this could take up to 24-48 hours but is often quicker), you will be able to create domains and sites directly in cPanel/WHM after pointing the domain(s) to ns1.yourdomain.com/ns2.yourdomain.com

  • Ok, so this is what I have done so far. However, still haven't had much success

    • I have created a new droplet
    • Assigned Floating IP
    • Installed cPanel DNSonly
    • Setup resolver and nameservers
    • Set nameservers to ns1(droplet IP) and ns2(floating ip).
    • I set the host names w/ IP address in godaddy domain manager - ns1 and ns2 point to DO IP and floating IP
    • Set my nameservers on main cPanel/WHM hosting server to ns1/ns2

    I feel like I might be missing something here. When I visit the clients website (account under cpanel/whm), website doesn't load. MXtoolbox gives error Unable to resolve "domainname.com" to an IP address.

    • If you can share the domain you're setting up It'd be a lot easier to help troubleshoot. If you're not comfortable sharing it publicly you can share it in an email to me at ryan@digitalocean.com (We'll keep the actual troubleshooting here but can share non-public information via email)

Okay, I am working on setting up a DNSonly server. Will post back once I make some progress

Thank you for posting so promptly!

I've set up several cPanel DNS-Only servers on DO droplets. Here's the basic process:

  1. Create your droplet, install and configure cPanel DNS-Only
  2. Make sure the hostname you give the droplet matches the hostname of the nameserver you are creating (E.g. If you wanted the name server hostname "ns1.acmeco.com", make sure the droplet hostname is also ns1.acmeco.com. During the cPanel installation you'll be asked to provide nameservers for the server; use "ns1.acmeco.com" and "ns2.acmeco.com" (assuming you will set up two cPanel DNS-Only servers.)
  3. When providing the nameservers during the cPanel set up the IP address for the "A" records should match the IP addresses that were assigned to the Droplet(s) by DO.
  4. When the setup is complete, you'll need to add your new DNS server to a new or existing cPanel DNS cluster if you want to be able to manage DNS zones from WHM. If not, you'll need to edit zone files from the DNS servers' command line. cPanel provides separate documentation for adding a DNS-Only server to a DNS cluster.
  5. After connecting your DNS server to a cPanel DNS cluster, you will create two DNS zones as follows: one for acmeco.com with an "A" record for "ns1" that points to the DNS servers' IP address. A second DNS zone called "ns1.acmeco.com" with an "A" record pointing to the same IP address. Repeat this process if you've created a second DNS-Only server (e.g., ns2.acmeco.com.)
  6. Register your nameservers. You need to register your nameservers with the domain registrar where you registered the domain name used by your DNS server. E.g., if you've created a server using the hostname "ns1.acmeco.com", then log into the Registrar account for acmeco.com and look for a place to register nameservers. Registering a nameserver should be a simple form that asks for a nameserver hostname and IP address. In this case, you will enter "ns1.acmeco.com" and its DO IP address. Repeat the same process if you created a second name server.
  7. Assign the new nameservers to the domain name. While still logged into the Registrar account change the nameservers for "acmeco.com" to "ns1.acmeco.com" and "ns2.acmeco.com".
  8. Test. Head over to Pingdom and use their DNS Health tool to test your new nameservers; enter "acmeco.com" as the domain to test.

You'll need to wait 24 to 48 hours for the nameserver registration + DNS changes to fully-propagate. And then check again using a DNS health tool. If everything looks good, your new nameservers should be ready to use.

This comment does not include any information about securing a cPanel DNS-Only server. Please take the time to do some research on the topic and the steps necessary to ensure your new server is secure.

Have another answer? Share your knowledge.