How to Add DNS Records in cPanel (A, CNAME, MX, TXT)
To connect your domain to an email service, an external application or a service that asks for verification (e.g. Google Search Console), you need to add DNS records. In your web hosting package this is done with cPanel's Zone Editor. This article explains step by step how to add A, CNAME, MX and TXT records.
Before You Start: Check Your Nameservers
DNS changes you make in cPanel only take effect if your domain uses your hosting service's nameservers. If your domain's DNS is managed elsewhere, such as Cloudflare, you need to add the records in that service's panel. You can see which nameservers your domain uses with this command:
nslookup -type=ns yourdomain.com We explain what each record type does in detail in our DNS guide.
Opening the Zone Editor
- Log in to cPanel.
- In the Domains section, click Zone Editor.
- Click the Manage button on your domain's row. This screen shows all DNS records for your domain.
- Use the + Add Record button to create a new record and choose the record type.
Adding an A Record
An A record points a domain or subdomain to an IPv4 address. For example, to point panel.yourdomain.com to a server:
- Name:
panel(cPanel completes the domain automatically) - Type: A
- Record: the target IP address, e.g.
203.0.113.10
Adding a CNAME Record
A CNAME record points a subdomain to another domain name. External services (e.g. a store or help desk platform) often ask for this record.
- Name:
shop - Type: CNAME
- Record: the target address provided by the service, e.g.
target.exampleservice.com
A CNAME record is not added for the root domain (yourdomain.com); use an A record for the root domain.
Adding an MX Record
An MX record determines which server receives email sent to your domain. If you are moving your email to an external service:
- Select MX as the record type.
- Enter the value given by your provider in the Priority field (a lower number means higher priority).
- Enter the server name given by your email provider in the Destination field.
- Delete the old MX records once the move to the new service is complete.
After changing the MX record, check that cPanel's Email Routing setting is set to Remote Mail Exchanger; otherwise the server may try to keep mail sent to your own domain locally.
Adding a TXT Record (SPF, DKIM, DMARC and Verification)
TXT records are used for email security settings such as SPF, DKIM and DMARC, and for domain verification by services such as Google Search Console.
- Name: usually the root domain for SPF and verification (left empty or set to the domain),
_dmarcfor DMARC - Type: TXT
- Record: the full value provided by the service
Important: A domain must have only one SPF record. If you are adding a new sending service, edit the existing record instead of creating a new one. You can find SPF, DKIM and DMARC settings in our guide on why business emails go to spam.
What Is TTL and What Should I Choose?
TTL (Time To Live) specifies, in seconds, how long the record is cached by other DNS servers. 3600 (1 hour) is a balanced value for most records. If you plan to change a record soon, lowering its TTL to something like 300 a day before the change helps the new value spread faster.
Checking the Record
After you add a record, it takes from a few minutes to a few hours to propagate. To check:
nslookup -type=a panel.yourdomain.com
nslookup -type=mx yourdomain.com
nslookup -type=txt yourdomain.com Common Problems
I added the record but it doesn't show up
First check that your domain's nameservers point to your hosting service. If they do, wait for the TTL period; the new value appears once the old record expires from caches.
My email stopped arriving after the MX change
Check that the MX destination is spelled correctly, that old and new MX records don't conflict, and the Email Routing setting in cPanel.
I'm not sure which value to enter
Open a support ticket from the Netiyo Client Area and describe the purpose of the record you want to add (e.g. "external email service", "Search Console verification").
Thanks for your feedback!