If your website and email are hosted on a cPanel shared hosting account, this guide will walk you through setting up SPF, DKIM, and DMARC. The good news: cPanel often has built-in tools that make this easier than you’d expect.

Who Is This For?
This guide is for small businesses and website owners using cPanel-based shared hosting (HostGator, Bluehost, SiteGround, A2 Hosting, GoDaddy, Namecheap, etc.) where cPanel handles both web hosting and email.

Step 1: Configure SPF

Most cPanel hosting providers automatically create a basic SPF record when you add a domain. However, you should verify it exists and is correct.

Option A: Via cPanel’s Email Deliverability Tool

  1. Log in to cPanel
  2. Go to Email → Email Deliverability
  3. Find your domain and click “Manage”
  4. The SPF section will show your current record and suggest fixes
  5. Click “Install the suggested record” if prompted

Option B: Manual DNS Entry

If you manage DNS separately (e.g., Cloudflare, Route 53), add this TXT record:

Type:TXT
Host/Name:@
Value:v=spf1 +a +mx +ip4:YOUR.SERVER.IP -all
TTL:3600
💡 Find your server IP: In cPanel, go to the right sidebar — your server’s IP address is shown under “General Information”. Or check Server Information in the dashboard.

If you also use external email services (Mailchimp, SendGrid, etc.), add their includes too:

v=spf1 +a +mx +ip4:YOUR.SERVER.IP include:servers.mcsv.net -all

Step 2: Configure DKIM

cPanel has built-in DKIM support that generates and manages keys automatically.

Enable DKIM via Email Deliverability

  1. In cPanel, go to Email → Email Deliverability
  2. Find your domain and click “Manage”
  3. In the DKIM section, click “Install the suggested record”
  4. cPanel will generate a DKIM key pair and publish the DNS record automatically (if DNS is managed by cPanel)
External DNS? If your DNS is managed elsewhere (Cloudflare, etc.), cPanel will show you the DKIM record value. Copy it and add it manually as a TXT record at the hostname shown (typically default._domainkey).

Manual DKIM (If Email Deliverability Isn’t Available)

Older cPanel versions may not have the Email Deliverability tool. In that case:

  1. Go to Email → Authentication (or Email → DKIM)
  2. Click “Enable” for DKIM
  3. If using external DNS, copy the record and add it at your DNS provider

Step 3: Configure DMARC

cPanel doesn’t have a built-in DMARC tool, so you’ll add this DNS record manually.

Via cPanel Zone Editor

  1. In cPanel, go to Domains → Zone Editor
  2. Find your domain and click “Manage”
  3. Click “Add Record” → “Add TXT Record”
  4. Enter:
    • Name: _dmarc.yourdomain.com. (with trailing dot, or just _dmarc depending on your cPanel version)
    • TTL: 3600
    • Type: TXT
    • Record: v=DMARC1; p=none; rua=mailto:your-selector@dmarccloud.com; adkim=r; aspf=r
  5. Click “Save Record”

Use our DMARC Record Generator to build the exact record value.

✓ Start with p=none to monitor before enforcing. Follow the enforcement journey once reports are clean.

Verify Your Setup

  1. Use our Domain Checker to verify SPF, DKIM, and DMARC are published
  2. Send a test email from your cPanel-hosted email to an external Gmail account
  3. In Gmail, view “Show original” and confirm SPF, DKIM, and DMARC all pass
  4. Check cPanel’s Email Deliverability tool — all three indicators should show green

Common cPanel Issues

DNS managed by cPanel but domain registered elsewhere
If your domain’s nameservers point to the hosting provider, cPanel manages DNS and can auto-install records. If nameservers point elsewhere (Cloudflare, GoDaddy, etc.), you must add SPF, DKIM, and DMARC records manually at your DNS provider.
Email Deliverability shows “problems exist”
This usually means DNS records don’t match what cPanel expects. Click “Manage” to see the suggested records and install them. If using external DNS, copy the suggested values to your DNS provider.
DKIM record too long
Some DNS providers don’t handle long TXT records well. cPanel typically generates 2048-bit DKIM keys. If your DNS provider truncates the value, try adding it as two separate quoted strings within a single TXT record, or contact your DNS provider for support.
Website contact forms failing SPF
Contact form plugins (WordPress, etc.) that use PHP’s mail() function send from the server — which IS covered by your SPF +a mechanism. If they’re failing, it’s usually because the From: address doesn’t match your domain (some forms use the visitor’s email address as the From: — configure the form to use your domain’s email instead).
Shared IP = shared reputation
On shared hosting, your server’s IP is shared with potentially hundreds of other accounts. If another account sends spam, your IP reputation suffers. SPF, DKIM, and DMARC help distinguish your legitimate email. Consider a dedicated IP if deliverability is critical.

Using cPanel Email with External DNS (Cloudflare, etc.)

If your DNS is managed by Cloudflare or another external provider, you need to manually copy records from cPanel:

  1. In cPanel Email Deliverability, view the suggested records for SPF and DKIM
  2. Copy each record’s name and value
  3. Log into your DNS provider and add them as TXT records
  4. Add the DMARC record manually (not shown in cPanel)
  5. Return to cPanel Email Deliverability and click “Repair” to verify the records resolve correctly

Summary Checklist

  • ☐ SPF record published (via Email Deliverability or manually)
  • ☐ Only one SPF record per domain
  • ☐ DKIM enabled in cPanel and DNS record published
  • ☐ DMARC TXT record added at _dmarc with p=none
  • ☐ cPanel Email Deliverability shows all green
  • ☐ Test email confirms SPF PASS, DKIM PASS, DMARC PASS
  • ☐ External sending services (if any) included in SPF

For more on the implementation process, see How to Implement DMARC. For SPF details, see the SPF Record Syntax Guide.