Managing DNS (Domain Name System) records in cPanel allows you to control how your domain connects to websites, mail servers, and other internet services. Whether you're changing your website's IP address, setting up custom email hosting, or configuring subdomains, proper DNS management is essential for keeping your domain working correctly.
This guide provides step-by-step instructions for adding, editing, and removing DNS records in cPanel.
1. Log in to cPanel
-
Open your browser and go to your cPanel login URL.
-
Enter your cPanel username and password.
-
Click Log in to access the cPanel dashboard.
2. Open the Zone Editor
-
Scroll down to the Domains section.
-
Click Zone Editor.
-
This tool lets you manage DNS records for all domains associated with your hosting account.
3. Choose a Domain
-
In the Zone Editor, you'll see a list of your domains.
-
Click Manage next to the domain you want to edit.
4. View Existing DNS Records
-
A list of current DNS records will appear, including types like:
-
A (Address)
-
CNAME (Alias)
-
MX (Mail Exchanger)
-
TXT (Text Record)
-
-
Each record includes a name, type, and destination value.
Adding, Editing, and Deleting DNS Records
Adding a DNS Record
-
Click + Add Record
-
Choose a record type from the dropdown menu:
-
A Record: Enter a domain/subdomain and its IP address.
-
CNAME Record: Enter a subdomain and its alias target.
-
MX Record: Set a priority and enter the mail server hostname.
-
TXT Record: Enter a domain and text value (used for verification, SPF, etc.).
-
-
Click Save Record.
Editing a DNS Record
-
Find the record you want to change.
-
Click Edit next to the record.
-
Update the name, value, or priority as needed.
-
Click Save Record.
Deleting a DNS Record
-
Locate the record you want to remove.
-
Click Delete.
-
Confirm deletion when prompted.
Common DNS Configuration Tasks
Updating the A Record
Use this when your website moves to a new server:
-
Find the existing A Record for your domain (
@
or domain root). -
Click Edit.
-
Update the IP address to your new server's IP.
-
Save the changes.
Adding a CNAME Record for a Subdomain
To redirect a subdomain like blog.yourdomain.com:
-
Click + Add Record and select CNAME.
-
Name: blog.
-
Target: the destination domain (e.g., yourdomain.com).
-
Save the record.
Setting Up MX Records for Email
To configure email with a third-party provider:
-
Delete old MX records if needed.
-
Click + Add Record and choose MX.
-
Priority: Enter the value provided by your email service (lower = higher priority).
-
Destination: Mail server hostname.
-
Save the changes.
Additional Tips and Best Practices
DNS Propagation Time
Changes to DNS records may take up to 24–48 hours to propagate globally. During this time, behavior may vary depending on location or cached data.
Back Up Before Making Changes
Before editing DNS settings, take a screenshot or copy your current records. This allows you to revert if anything goes wrong.
Use Appropriate TTL Settings
TTL (Time to Live) controls how long DNS records are cached:
-
Lower TTL (e.g., 300 seconds) = faster propagation, more frequent lookups.
-
Higher TTL (e.g., 14400 seconds) = slower propagation, less frequent lookups.
-
A default TTL of 14400 (4 hours) is usually sufficient.