
DNS & Deliverability
DNS setup guides.
DNS & Deliverability
How to Set Up cPanel DNS Records for Email Marketing
Learn how to configure SPF, DKIM, DMARC, MX, and tracking records in cPanel Zone Editor and set remote email routing without mail delivery errors.
By Peak Meadow Published September 19, 2026

You manage DNS records in cPanel using the Zone Editor tool. Many shared hosting providers, including Bluehost, InMotion Hosting, and A2 Hosting, rely on cPanel to manage customer domain records. Before adding email marketing records, you need to verify where your nameservers point and adjust your email routing settings so your web server does not misroute outbound messages.
cPanel DNS navigation and nameserver check
To access your DNS records in cPanel:
- Log in to your hosting account and open the cPanel dashboard.
- In the Domains section, click Zone Editor.
- Locate your domain name in the table and click Manage.
Before modifying records, confirm that your domain uses your web host’s nameservers. Check your domain registrar account to see where the nameservers point. If your domain uses external nameservers like Cloudflare or a registrar’s default DNS, changes made in cPanel will have no effect on live traffic. In that case, add your records in the external provider’s control panel.
Adjusting cPanel email routing
If you send messages or receive mail through third-party services like Google Workspace, Microsoft 365, or dedicated marketing servers, cPanel must know not to intercept that mail locally.
- Return to the main cPanel dashboard.
- In the Email section, click Email Routing.
- Select your domain from the dropdown menu.
- Under Configure Email Routing, select Remote Mail Exchanger.
- Click Change.
Leaving this setting on “Local Mail Exchanger” causes the cPanel server to treat all domain mail as local, preventing contact forms and automated system notifications from reaching your external inboxes.
Adding a record in cPanel
- In the Zone Editor, click Manage next to your domain.
- Click the + Add Record button at the top right of the table (or click the arrow next to it to pick a specific record type).
- Select the record type from the Type dropdown (
TXT,CNAME, orMX). - Enter the Name value:
- For root domain records (such as SPF), enter your full domain name (for example,
yourdomain.com.). cPanel automatically appends the trailing dot. - For subdomains (such as
_dmarcor DKIM selectors), enter the prefix. When you click outside the field, cPanel appends your domain name and a trailing dot.
- For root domain records (such as SPF), enter your full domain name (for example,
- Enter the target data in the Record field:
- For TXT records, paste the text string into the Record field. Do not wrap the value in quotation marks.
- For CNAME records, enter the target hostname in the Record field.
- For MX records, enter the mail server hostname in the Destination field, and enter your priority integer into the Priority field.
- Leave TTL at the default value (typically
14400or1200) unless your email provider specifies otherwise. - Click Save Record.
cPanel details zone records and field behavior in its official cPanel Zone Editor documentation.
Required authentication records
Receiving mail servers use these three records to verify that messages sent from your domain are authentic.
1. SPF (Sender Policy Framework)
- Type: TXT
- Name:
yourdomain.com.(enter your domain or@; cPanel converts it to your fully qualified domain name) - Record: The SPF string provided by your email platform, such as:
v=spf1 include:_spf.google.com include:sendgrid.net ~all - TTL: 14400
Merging multiple SPF records
Shared hosting accounts usually have a default SPF record generated when the account was created (for example, v=spf1 +a +mx +ip4:... ~all).
Do not add a second TXT record starting with v=spf1. Publishing multiple SPF records causes receiving mail servers to fail evaluation with a PermError, sending your messages to spam or rejecting them outright.
To update an existing SPF record:
- In the Zone Editor record list, use the Filter bar to search for
TXTrecords. - Locate the existing record starting with
v=spf1and click Edit. - Add your email marketing provider’s
include:mechanism before the closing qualifier (~allor-all). For example:v=spf1 +a +mx +ip4:192.0.2.1 include:sendgrid.net ~all - Click Save Record.
Do not add quotation marks around the string in the Record field. cPanel handles formatting automatically.
2. DKIM (DomainKeys Identified Mail)
Email providers supply DKIM records in either CNAME or TXT format:
CNAME-based DKIM
Most modern email platforms (such as Klaviyo, Postmark, SendGrid, and Amazon SES) use CNAME records:
- Type: CNAME
- Name: The selector prefix, such as
s1._domainkey(cPanel appends your domain name automatically) - Record: The target hostname provided by your email platform, such as
s1.domainkey.example-esp.com. - TTL: 14400
If your email service provides a full hostname like s1._domainkey.yourdomain.com, enter only s1._domainkey in the Name field. Entering the full domain name without a trailing dot causes cPanel to append your domain a second time, creating s1._domainkey.yourdomain.com.yourdomain.com..
TXT-based DKIM
Some services provide a raw public key string:
- Type: TXT
- Name: The selector prefix, such as
google._domainkey - Record: The raw public key string starting with
v=DKIM1; k=rsa; p=... - TTL: 14400
Paste the full public key into the Record field without quotation marks.
3. DMARC (Domain-based Message Authentication, Reporting, and Conformance)
- Type: TXT
- Name:
_dmarc(cPanel expands this to_dmarc.yourdomain.com.) - Record:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com; pct=100; - TTL: 14400
Start with p=none to collect delivery reports without blocking legitimate email. Once SPF and DKIM authenticate consistently across all your sending services, update the policy tag to p=quarantine or p=reject.
Optional deliverability and branding records
These records configure custom subdomains for bounce management and click tracking.
4. Custom return path (bounce domain) (optional)
- Type: CNAME
- Name:
bounces(or the subdomain prefix specified in your platform settings) - Record: The mail server hostname assigned by your email platform (such as
pm.mtasv.net.) - TTL: 14400
5. Branded tracking domain (optional)
- Type: CNAME
- Name:
links(ortrack,click, oremailas specified by your platform) - Record: The tracking hostname assigned by your email platform
- TTL: 14400
Setting up custom MX records (if required)
If your email marketing service requires dedicated MX records for inbound message processing, reply handling, or sending subdomains:
- In the Zone Editor, click + Add Record, then choose Add “MX” Record.
- Enter the details:
- Name:
yourdomain.com.for the root domain, ormail.yourdomain.com.for a sending subdomain. - Priority: The integer specified by your provider (such as
10). - Destination: The mail server address provided by your platform (such as
feedback-smtp.us-east-1.amazonses.com.). - TTL: 14400
- Name:
- Click Save Record.
If you use cPanel webmail or Google Workspace for your business mailboxes, do not delete or overwrite your primary root MX records. Overwriting root MX records stops standard incoming messages for your organization. Only add MX records for dedicated sending subdomains unless you are switching your entire email service.
Verifying your DNS records
You can check whether your cPanel DNS records have resolved using Windows PowerShell and Resolve-DnsName:
Check SPF
Resolve-DnsName -Name yourdomain.com -Type TXT
Review the Strings column. Verify that only one SPF record exists and that your sending service mechanism is listed.
Check DMARC
Resolve-DnsName -Name _dmarc.yourdomain.com -Type TXT
Confirm that the output contains your v=DMARC1; p=... string.
Check DKIM
Replace s1 with your provider’s specific selector:
Resolve-DnsName -Name s1._domainkey.yourdomain.com -Type CNAME
If your platform uses TXT-based DKIM, change -Type CNAME to -Type TXT. The output will display your provider’s target hostname or public key.
Check tracking and bounce records (if configured)
Resolve-DnsName -Name bounces.yourdomain.com -Type CNAME
The NameHost column should point to your email platform’s destination address.
Check MX records (if configured)
Resolve-DnsName -Name yourdomain.com -Type MX
The NameExchange column should list your designated mail servers with their numerical priorities under Preference.
Common troubleshooting issues
| Issue | Root cause | Solution |
|---|---|---|
Subdomain hostname is duplicated (_dmarc.yourdomain.com.yourdomain.com.) |
The full domain was typed into the Name field without a trailing dot. | Enter only the subdomain prefix (such as _dmarc), or include the trailing dot if typing the full domain. |
SPF status shows PermError |
Multiple TXT records begin with v=spf1. |
Search the Zone Editor for TXT records, remove the duplicate entry, and merge all include: mechanisms into a single record. |
| Contact form emails from your website stop arriving | cPanel Email Routing is set to Local Mail Exchanger while using external email. | Open Email Routing in cPanel, select your domain, and switch the routing to Remote Mail Exchanger. |
| Verification fails with formatting error | Quotation marks were manually pasted into the Record field. | Edit the record and remove surrounding quotation marks. cPanel formats the text field internally. |
| Changes in cPanel do not take effect globally | The domain points to external nameservers. | Check your domain registrar to verify nameservers. If external nameservers are active, configure your DNS in that external provider’s control panel. |
| Business inboxes stop receiving messages | Root MX records were replaced with email marketing MX records. | Restore your original primary mail exchanger records, and configure email marketing MX records on a dedicated subdomain. |