How to manage DNS zones in cPanel
cPanel keeps the DNS records of every domain on an account in the Zone Editor. This guide shows how to add, edit and delete A, CNAME, MX and TXT records there, what the TTL and priority fields mean, and what to check when a change does not show up.
Short answer
To manage DNS in cPanel, open Domains » Zone Editor, find the domain and click Manage. Click Add Record to create an A, AAAA, CNAME, MX, TXT, SRV or CAA record, or use the quick A Record, CNAME Record and MX Record buttons on the domain’s row. Edit and Delete change a record. The records only take effect if the domain’s nameservers point to this server.
- Where
- cPanel » Domains » Zone Editor
- You need
- A cPanel login with the Zone Editor features enabled
- Applies to
- cPanel & WHM 134 (LTS) to 138, Jupiter theme
- Server admin
- WHM » DNS Functions » DNS Zone Manager
Before you change a record
Records in the Zone Editor only take effect if this server is the authoritative nameserver for the domain, which means the nameservers set at the domain registrar point to it. If the domain uses Cloudflare or another DNS host, make the change there instead.
Note the current value before you edit a record. The Zone Editor has no undo. The only way back is to type the old value again, or to reset the whole zone, which removes every record you added.
Open the Zone Editor
- Log in to cPanel.
- In the Domains section, click Zone Editor.
- Find the domain in the list. Each row has quick buttons for A Record, CNAME Record and MX Record, plus DNSSEC and Manage.
- Click Manage to see every record in the zone, with the Name, TTL, Type and Record columns. You can filter the table by name or by record type.
Add an A record
An A record points a name to an IPv4 address, for example the server that hosts a website.
- Click A Record next to the domain.
- In Name, enter the host name, for example
shop.example.com. - In Address, enter the IPv4 address, for example
203.0.113.10. - Click Add An A Record.
NoteFor an IPv6 address, add an AAAA record from the Manage view instead. In that view cPanel’s documentation asks for the full name with a trailing dot, such as shop.example.com.
Add a CNAME record
A CNAME makes one name an alias of another, for example www.example.com pointing to example.com. The target must be a host name, never an IP address.
- Click CNAME Record next to the domain.
- In Name, enter the alias, for example
www.example.com. - In CNAME, enter the target host name, for example
example.com. - Click Add A CNAME Record.
NoteDNS does not allow a CNAME next to other records with the same name. If the name already has an A record, delete it first.
Add or change an MX record
MX records tell other mail servers where to deliver mail for the domain. Each has a priority: the lowest number is tried first, and 0 is the highest priority.
- Click MX Record next to the domain.
- In Priority, enter a number, for example
10. - In Destination, enter the mail server’s host name, for example
mail.example.com. It must be a host name, not an IP address. - Click Add An MX Record.
If mail moves to an outside provider such as Google Workspace or Microsoft 365, also open cPanel » Email » Email Routing and choose Remote Mail Exchanger, or Automatically Detect Configuration, then click Change. Otherwise the server can keep delivering the domain’s mail to its own mailboxes.
NoteIf you cannot see MX records at all, your host has not enabled the Email Routing feature for your account.
Add a TXT record for verification or SPF
TXT records hold text that other services read, for example a site verification code or an SPF policy.
- Click Manage next to the domain.
- Click Add Record, then set the type to TXT.
- Enter the Name (the domain itself, or a host such as
_dmarc.example.com.), a TTL and the text in Record. - Click Save Record.
For SPF, DKIM and DMARC, the cPanel » Email » Email Deliverability screen can install the suggested records for you and check them. Keep a single SPF record per name: two SPF records make SPF checks fail.
NoteThe Record box accepts any text, including typos. Compare a verification code character by character before you save it.
Edit or delete a record
- Click Manage next to the domain.
- Filter the table by name or type to find the record.
- Click Edit, change the values and click Save Record. To remove it, click Delete, then Continue.
Actions » Reset DNS Zone in the same view puts the zone back to cPanel’s defaults. cPanel tries to keep the domain’s TXT records, but every other record you added is removed, so use it only when you mean to start over.
TTL, serial and propagation
- TTL is how many seconds other DNS resolvers may cache a record. cPanel’s default is
14400seconds (4 hours); the server administrator sets it in WHM » Basic WebHost Manager Setup. - Lower the TTL a day before a planned move, for example to
300, so the new value spreads quickly. Raise it again afterwards. - cPanel raises the zone’s SOA serial by itself on every change. You never edit it.
- Resolvers that cached the old record keep using it until its TTL runs out. A nameserver change at the registrar can take one to three days to reach everyone.
- SOA and NS records are not in the cPanel Zone Editor. The server administrator edits them in WHM » DNS Functions » DNS Zone Manager.
Common problems
- Add Record only offers A and CNAME.
- Your host has enabled the Simple Zone Editor feature but not the Advanced Zone Editor. Ask them to enable it in WHM » Feature Manager.
- MX records are missing.
- The Email Routing feature is off for your account. Your host can enable it in WHM » Feature Manager.
- The record is saved, but the site or mail still uses the old value.
- Either the old record is still cached (wait for its TTL), or the domain’s nameservers point to another DNS host, so this zone is not the one the internet reads. Check the nameservers at your registrar.
- The CNAME does not work.
- The target is an IP address, or the same name also has other records. Use an A record for an IP address.
Doing it from CTAServer
CTAServer connects to each WHM with an API token on port 2087 and puts the DNS zones of every connected cPanel server on one DNS zones screen. Records are added, edited and deleted through WHM’s own API, so each change also shows up in cPanel’s Zone Editor.
- Record types: A, AAAA, CNAME, MX, TXT, NS, SRV and CAA. TTL can be 60 to 604,800 seconds; left empty, it is 14,400.
- The records cPanel creates for its own services (cpanel, webmail, whm, autodiscover and others) and the NS records at the zone root are locked, so they cannot be broken by mistake.
- After each change, CTAServer reads the zone back from WHM. If the zone changed in the meantime, it asks you to refresh instead of editing the wrong record.
- The DNSSEC status is shown. Turning DNSSEC on or off stays in cPanel.
- Every change is written to the audit log with the name of the person who made it.
Frequently asked questions
How long does a DNS change in cPanel take to work?
A new record usually answers within minutes. A changed record can take as long as its old TTL, 14400 seconds (4 hours) by default, because resolvers keep the cached value until then. A nameserver change at the registrar can take one to three days.
Where is the DNS Zone Editor in cPanel?
On the cPanel home page, in the Domains section, click Zone Editor. If it is not there, your host has not enabled the Zone Editor features for your account in WHM » Feature Manager.
What is the difference between an A record and a CNAME record?
An A record points a name straight to an IPv4 address. A CNAME points a name to another host name, which then resolves on its own. Use a CNAME for aliases such as www, and an A record when you have an IP address.
Can I change the NS or SOA records in cPanel?
No. The cPanel Zone Editor does not show the SOA record or the nameserver records at the zone root. The server administrator changes them in WHM » DNS Functions » DNS Zone Manager, and the domain’s nameservers themselves are set at the registrar.
How do I point my domain to another server in cPanel?
In Zone Editor » Manage, edit the A record of the domain and of www (or its CNAME) and enter the new server’s IP address. If the domain’s nameservers are elsewhere, for example at Cloudflare, change the records there instead.
Can I undo a change in the Zone Editor?
There is no undo. Type the old value again, or use Actions » Reset DNS Zone, which restores cPanel’s default records and removes every record you added. Note values before you change them.
Connect your first server today.
Free for 7 days, no card needed. Create your account, add your first server with an API token or an SSH key, and the panel starts filling in a few minutes later.
No setup fee · Cancel anytime · EU-hosted