How to Create and Edit A, CNAME, MX, and TXT Records in cPanel
Updated last month
To create or edit a DNS record in cPanel, open Zone Editor, choose the domain with Manage, and save the record with the type, name, and value provided by the service you want to connect. First, check that the domain’s DNS is managed through that hosting account: if it’s managed by Cloudflare or another provider, make the change there.
You need access to cPanel and the exact destination values, such as the website’s IP address, the mail server name, or the verification code. If you don’t have access yet, see how to log in to cPanel.
Confirm where your DNS is managed
The DNS zone that responds publicly depends on the nameservers delegated to your domain. Seeing the domain in cPanel doesn’t prove that its zone is in use.
Check the nameservers in the panel where you registered the domain.
Identify the provider that manages those servers and edit the records in its panel.
If you use our nameservers, you can compare the values with the Duplika DNS guide. If you don’t recognize the nameservers or use a custom delegation for a subdomain, contact us before changing the zone.
Editing a record and changing nameservers are two different tasks. You don’t need to move all your DNS to another provider to connect a service using A, CNAME, MX, or TXT.
Choose the right record type
The service provider should tell you which record to publish. Each type accepts a different value, and they aren’t interchangeable.
Type
What it’s used for
What to enter as the value
A
Point a name to a server using IPv4.
An IPv4 address, without https://, paths, or ports.
CNAME
Make one name an alias of another.
A domain or server name, not an IP address or full URL.
MX
Specify which servers receive the domain’s email.
The mail server’s full name and a priority.
TXT
Publish a verification or information such as SPF, DKIM, or DMARC.
The exact text required by the service.
The Name field identifies the name you want to configure. To avoid ambiguity, check the full name that’s saved, such as www.example.com.; the final period represents a fully qualified name, and cPanel may automatically add the domain when you enter only part of the name.
The TTL is the record’s cache duration, expressed in seconds: 3600 equals one hour. Keep the value recommended by the provider, or the current value if there’s no reason to change it. Lowering the TTL now won’t clear responses that were already cached using the previous TTL.
The examples using example.com and 192.0.2.10 are for illustration only. They aren’t your service’s details or Duplika’s IP address: replace them with the values confirmed for your domain.
I want to connect an external store or platform without affecting email
This is a common scenario: services such as Google Workspace, Shopify, or Tienda Nube request A, CNAME, or TXT records to verify a domain or publish a store, and this change shouldn’t affect email delivery.
Before saving, make sure the current MX, SPF, DKIM, and DMARC records remain unchanged: connecting a website and configuring email involve different records.
If the platform asks you to replace the MX records, contact us first: moving email delivery is a separate step from connecting a website or store.
Open the zone and save the current settings
A copy of the current values lets you revert an individual change without resetting the entire DNS zone.
Open Zone Editor in cPanel, under the Domains menu.
Click Manage next to the correct domain.
Check whether a record with the same name and type already exists.
Save a screenshot or copy of its name, type, TTL, value, and priority, if applicable.
If you’re replacing a destination, use Edit on the existing record. Adding another A or MX record won’t remove the old one and may leave multiple destinations active.
Create or edit an A record
Use A when the service gives you an IPv4 address. Creating the record doesn’t install a website or, by itself, configure the SSL certificate or the domain in the application.
Use Add Record for a new name or Edit to modify the existing record.
Enter the name you want to point in Name, such as example.com. or tienda.example.com..
Choose A under Type.
Enter the confirmed IPv4 address in the record field, and keep or adjust the TTL according to your plan.
Click Save Record.
Also check whether an AAAA record exists for the same name. AAAA uses IPv6; if it points to a different server, some connections may still reach another destination even if the A record is correct.
Use CNAME when the service specifies a destination name, for example, to connect www or a subdomain.
Choose Add Record or edit the existing CNAME.
Enter the alias in Name, such as www.example.com..
Choose CNAME under Type.
Enter the full destination name as the value, without https:// or a path such as /tienda.
Click Save Record.
A CNAME shouldn’t coexist with A, AAAA, or other records for the same name. If you need to replace an incompatible record, save its value first and confirm that the service can now use the alias.
Don’t use a standard CNAME at the domain root, where the zone records also exist. If a provider asks you to point the main domain to a name instead of an IP address, contact us to find out which alternative your configuration supports.
A CNAME also doesn’t redirect one page to another URL: to change what the browser displays, you need a web redirect.
Create or edit an MX record
MX records control email delivery. Before changing them, the mailboxes must exist on the destination server.
Choose Add Record or edit the relevant MX record.
Enter the domain name that will receive email, usually the main domain.
Select MX and enter the priority specified by the provider.
Enter the full mail server name in Destination, not its IP address or an email address.
Click Save Record and repeat the process only for additional MX records specified by the provider.
Check the final set of records and Email Routing for the domain.
A lower numerical priority takes precedence. Don’t keep MX records from the previous provider as a presumed backup unless both services are configured for that purpose: they don’t copy messages between servers.
In cPanel, Local Mail Exchanger is appropriate when the mailboxes are on that server; Remote Mail Exchanger is appropriate when they’re hosted elsewhere. Automatic detection is based on the local zone, so check it carefully, especially if you manage DNS through another provider.
Create or edit a TXT record
The TXT name and value depend on the service that checks it. Copy both from that service’s settings; don’t reuse codes from another domain.
Choose Add Record or edit the TXT record for that setting.
Enter the requested name in Name. This may be the main domain or a specific name such as _dmarc.example.com..
Select TXT under Type.
Paste the exact text as the value, without adding line breaks or making changes when copying it from a document.
Click Save Record.
Multiple TXT records can coexist, for example, to verify different services. However, don’t publish two SPF policies starting with v=spf1 for the same name: authorized senders must be combined into a single policy. If cPanel won’t accept a new TTL when editing a TXT record because another TXT record with the same name has a different TTL, first remove the verification TXT record you no longer use.
For email authentication values, follow our SPF, DKIM, and DMARC guide. Adding a verification TXT record doesn’t replace an A record or change the MX records.
Check the change and the service
Saving the record in cPanel and seeing it published on the internet are two different checks. Afterward, you also need to test the website or email that depends on that record.
In Zone Editor, check the full name, type, and saved value.
Look up the same name and type on WhatsMyDNS: for a CNAME for www, search for www.example.com, not just the main domain.
Compare the responses with the expected value. For MX, also check the priority and destination name.
Test the service: open the website, verify the domain on the platform, or send a test email from an external account, depending on the change.
If different networks show different values, see our DNS propagation guide. If they all still show the previous value, first check that you edited the authoritative zone and the correct name.
If the DNS is correct but you see a certificate error or the wrong page, check the destination service’s configuration. Continuing to change the same record won’t fix that configuration.
How to fix an incorrect change
Revert only the records you changed using the values you saved. The correction may also take time to appear because of existing caches.
Don’t use Reset DNS Zone to undo an individual edit: it resets the zone and may remove settings for other services.
If you need help, send us a support request with the domain, record name and type, previous value, expected value, DNS provider, and time of the change. Include a screenshot of the public query; don’t attach control panel credentials.