How to create and edit A, CNAME, MX, and TXT records in cPanel
Updated 2 days ago
To create or edit a DNS record in cPanel, open Zone Editor, select the domain with Manage, and save the record with the type, name, and value provided by the service you want to connect. First, confirm that the domain’s DNS is managed from that hosting account: if it’s managed by Cloudflare or another provider, you must make the change there.
You need access to cPanel and the destination’s exact values, such as the site’s IP address, the mail server name, or the verification code. If you don’t have access yet, you can learn how to log in to cPanel.
Confirm where your DNS is managed
The publicly responding DNS zone depends on the nameservers delegated for your domain. The fact that the domain appears in cPanel does not prove that 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 different tasks. To connect a service using A, CNAME, MX, or TXT, you don’t need to move all DNS to another provider.
Choose the correct record type
The service provider must tell you which record to publish. Each type accepts different data, and they are not interchangeable.
Type
What it is used for
What goes in the value
A
Point a name to a server using IPv4.
An IPv4 address, without https://, paths, or ports.
CNAME
Make a name an alias of another name.
A domain or server name, not an IP address or a complete URL.
MX
Specify which servers receive the domain’s mail.
The full name of the mail server and a priority.
TXT
Publish 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 complete name that will be saved, for example www.example.com.; the final period represents a fully qualified name, and cPanel may add the domain automatically when you enter only part of it.
The TTL is the record’s cache time, expressed in seconds: 3600 equals one hour. Keep the value recommended by the provider, or the current value if there is no reason to change it; lowering the TTL now does not clear responses that were already cached with the previous TTL.
The examples using example.com and 192.0.2.10 are illustrative. They are not your service’s data or Duplika’s IP address: replace them with the values confirmed for your domain.
I’m going to connect an external store or platform without changing email
This is a common situation: services such as Google Workspace, Shopify, or Tienda Nube request A, CNAME, or TXT records to verify the domain or publish the store, and that change must not affect mail delivery.
Before saving, confirm that the current MX, SPF, DKIM, and DMARC records remain intact: connecting the website and configuring email involve different records.
If the platform asks you to replace the MX records, contact us first: moving mail delivery is separate from connecting the website or store.
Open the zone and save the previous configuration
A copy of the current values lets you undo a specific 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 does not remove the previous one and may leave multiple active destinations.
Create or edit an A record
Use A when the service gives you an IPv4 address. Creating the record does not install a website or configure the SSL certificate or domain in the application by itself.
Use Add Record for a new name or Edit to modify the existing record.
Complete Name with the name you want to point, for example example.com. or store.example.com..
Choose A in 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 continue reaching another destination even though the A record is correct.
If the site is not yet associated with the hosting account, follow the guide to add the domain or subdomain.
Create or edit a CNAME
Use CNAME when the service gives you a destination name, for example to connect www or a subdomain.
Choose Add Record or edit the existing CNAME.
Complete Name with the alias, for example www.example.com..
Choose CNAME in Type.
Enter the full destination name in the value, without https:// or a path such as /store.
Click Save Record.
A CNAME must not coexist with A, AAAA, or other records for the same name. If you need to replace an incompatible record, first save its value and confirm that the service can already use the alias.
Do not use a standard CNAME at the domain root, where the zone’s other 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 does not 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 mail delivery. Before changing them, the mailboxes must exist on the destination server.
Choose Add Record or edit the corresponding MX record.
Complete the name of the domain that will receive mail, usually the main domain.
Select MX and enter the priority specified by the provider.
Complete Destination with the full name of the mail server, not its IP address or an email address.
Click Save Record and repeat the process only for the additional MX records specified by the provider.
Review the final set and Email Routing for the domain.
A lower numerical priority takes precedence. Do not keep MX records from the previous provider as assumed backup unless both services are configured for that purpose: they do not copy messages between servers.
In cPanel, Local Mail Exchanger applies when the mailboxes are on that server; Remote Mail Exchanger applies when they are hosted elsewhere. Automatic detection is based on the local zone, so it must be reviewed 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 queries it. Copy both from that service’s configuration; do not reuse codes from another domain.
Choose Add Record or edit the TXT record corresponding to that configuration.
Complete Name with the requested name, which may be the main domain or a specific name such as _dmarc.example.com..
Select TXT in Type.
Paste the exact text into the value without adding line breaks or making changes when copying it from a document.
Click Save Record.
Multiple different TXT records can coexist, such as verifications for different services. However, do not publish two SPF policies that begin with v=spf1 for the same name: authorized senders must be combined into a single policy. If cPanel does not accept the 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 guide to SPF, DKIM, and DMARC. Adding a verification TXT record does not 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 separate checks. Afterward, you also need to test the website or email that depends on that record.
In Zone Editor, check the complete name, type, and saved value.
Query that same name and type on WhatsMyDNS: for a CNAME for www, look up www.example.com, not just the main domain.
Compare the responses with the expected value. For MX records, 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, review our guide to DNS propagation. If they all still show the previous value, first confirm that you edited the authoritative zone and the correct name.
If the DNS is already correct but a certificate error or an incorrect page appears, review the destination service’s configuration. Continuing to change the same record will not fix that configuration.
How to correct an incorrect change
Revert only the modified records using the values you saved. The correction may also take time to appear because of existing caches.
Do not use Reset DNS Zone to undo a specific edit: it resets the zone and may remove configurations for other services.
If you need help, send us an inquiry 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; do not attach panel credentials.