How to Set Up SPF for cPanel/WHM

Configure SPF records for email sent from your cPanel-hosted server using the Email Deliverability tool.

Quick Answer — The Record You Need

Record Type

TXT

Host / Name

@

Value
v=spf1 +a +mx +ip4:YOUR.SERVER.IP ~all

Replace YOUR.SERVER.IP with your actual server IP address. cPanel can auto-generate this via the Email Deliverability tool.

Step-by-Step Setup

1

Log in to cPanel

Access your cPanel account (typically at yourdomain.com:2083 or yourdomain.com/cpanel).

2

Open Email Deliverability

Navigate to Email > Email Deliverability. This tool checks and manages SPF, DKIM, and reverse DNS.

3

Review the suggested SPF record

cPanel analyzes your domain and suggests an SPF record based on your server configuration. Click "Manage" or "Repair" next to your domain.

4

Accept or customize the SPF record

cPanel generates an SPF record including your server IP. You can accept the suggestion or customize it.

v=spf1 +a +mx +ip4:203.0.113.10 ~all
5

Install the record

Click "Install" or "Repair" to apply the SPF record. cPanel adds it to the DNS zone automatically if you use cPanel DNS.

Before & After

Before
(no SPF record)
After
v=spf1 +a +mx +ip4:203.0.113.10 ~all

Common Gotchas

  • cPanel uses IP-based SPF (ip4: mechanism) rather than include: mechanisms because it sends directly from your server.
  • If you use external mail services (Google Workspace, Microsoft 365) alongside cPanel, add their includes to the SPF record too.
  • Server-level SPF configuration in WHM (root access) can set defaults for all accounts. Account-level settings in cPanel are per-domain.

Verify Your Setup

After adding your DNS records, use our free SPF checker to verify everything is configured correctly. DNS changes typically propagate within minutes, but can take up to 48 hours.

Frequently Asked Questions

How do I find my cPanel server IP for SPF?

The Email Deliverability tool in cPanel auto-detects your server IP and includes it in the suggested SPF record. You can also check in WHM > Server Information.

Should I use +a +mx or ip4: in my cPanel SPF?

ip4: with your server IP is most precise. +a +mx are convenient but resolve at lookup time and can be less predictable.

Can I manage SPF from WHM instead of cPanel?

Yes. WHM (root access) can manage DNS zones for all accounts and set server-wide email authentication defaults.

Related Guides