How to Setup up SPF, DKIM, and DMARC on Shared Hosting with cPanel
If you’re on shared hosting with cPanel, setting up SPF, DKIM, and DMARC is straightforward — cPanel has built-in tools for this. Here’s how to configure each:
-
SPF Setup in cPanel
- Log in to cPanel
- Go to Email Deliverability (or sometimes called Authentication).
- Look for your domain (`domain.co.ke`) in the list.
- Click Manage next to the domain.
- Under SPF, click Install the Suggested Record.
This will auto-generate something like:
“`
v=spf1 +a +mx +ip4:198.23.58.219 ~all
“`
You can also edit it to include external services (e.g., Mailgun, Google) with `include:` if needed.
—
2. Setup in cPanel
1. Still in Email Deliverability (same section as SPF).
2. Under DKIM, click Install the Suggested Record.
> This generates a DKIM record (e.g., `default._domainkey.domain.co.ke`) with your public key automatically.
3. Wait for DNS propagation (can take a few hours).
—
3. DMARC Setup (Manual)
cPanel does not automatically set DMARC. You’ll add it manually:
1. Go to Zone Editor in cPanel.
2. Click Manage next to your domain.
3. Click Add Record → Choose TXT.
4. Fill in the form:
“`
Name: _dmarc
TTL: 14400 (or leave default)
Type: TXT
Record: v=DMARC1; p=quarantine; rua=mailto:reports@domain.co.ke; aspf=r;
“`
* Replace `reports@domain.co.ke` with your real address for DMARC reports.
* `p=none` if you just want to monitor first.
—
✅ Final Step: Verify Your Records
After configuration, verify each:
SPF: [https://mxtoolbox.com/spf.aspx](https://mxtoolbox.com/spf.aspx)
DKIM: [https://mxtoolbox.com/dkim.aspx](https://mxtoolbox.com/dkim.aspx)
DMARC: [https://mxtoolbox.com/dmarc.aspx](https://mxtoolbox.com/dmarc.aspx)