If you host your nameservers on a cPanel server, there may come a time when you need to adjust or create DNS records for one or more of the domains you host. While cPanel can be used to easily edit records for individual accounts, depending on the number of accounts on your server, editing each one individually could prove a time-consuming task. Thankfully, using WHM, it’s possible for DNS records to be created and edited for all accounts on the server at once. If you’re a WHM user looking for information on managing DNS records on your server, then this tutorial is for you.
*Note: If you don’t have access to WHM, or if you’re more familiar with cPanel and would prefer to use it when modifying DNS records, you can do this using cPanel’s DNS Zone options. For instructions on creating and editing DNS zones in cPanel, check out our article on How to Create DNS Records in cPanel.
Creating DNS Records in WHM
To create DNS records using WHM, follow these steps:
- First, you will need to log in to the WHM control panel using your username and password. You can access your WHM panel on your cPanel server by entering the following URL into your web browser:
https://(my server’s IP address):2087
or, if A records have already been propagated for your server, you can use:
- Once logged into WHM, navigate to Home -> DNS Functions -> Edit DNS Zone. This will open a new page.
- On the new page that opens, you will see a list of all the zones already on the server. Find the domain you wish to edit, select it, and click the Edit button below the box.
*Note: If you have a large number of accounts on your server, you can use the search bar to locate the individual domains you’re seeking to make edits on.
- After selecting your desired domain and clicking the Edit button, a new page will open where you can edit and create records.
- Starting at the top of the page, you will see all the records currently in place for your selected domain. If you need to edit any of these records, you can do so here by updating the text within these boxes.
*Note: By default, cPanel will include records for DKIM and SPF, unless set otherwise on the server, but will list these records as TXT files. You can see examples of both of these in the image above.
- Next, scroll down to the bottom of the page to locate the section where you can add additional records.
- To add a new record, start by clicking the Select drop-down menu, to the right of the top-most blank line. This will open a list of all the available record types that can be created on this domain. As mentioned above, if you are looking to add SPF or DKIM records to the domain you must select the TXT option and fill out the records with the appropriate information during creation.
*Note: if you are unsure what type of record you need to create or are unclear about their inherent differences, check the terminology section in our DNS Configuration Guide. Still unsure? Feel free to use one of the methods listed at the bottom of this post to reach out to our support team with any questions you may have.
- For the sake of example, let’s say you have another nameserver that you want to point an NS record to from your domain. Start by selecting the appropriate record type from the drop-down menu and fill in the blanks entering the domain on the left side and the nameserver you wish to point to on the right.
You can see this sample record as well as a few others in the image below. The additional blanks allow you to set multiple DNS records at once.
*Note: One of the most common mistakes in creating or editing records is not including the trailing ” . ” at the end of the record. All records with top-level domains should include the trailing period at the end of their domain names.
- Once you’ve added and edited all necessary records, click Save at the bottom to finalize your changes. You’ll be taken to a new page which will confirm if the changes have been made successfully or not. At this time, cPanel will check to ensure all the records satisfy their necessary requirements. Should any errors exist, information on these errors will be provided for you on this confirmation page.
And there you have it! Your DNS records are set and ready to go.