- To update SPF or DKIM records in Cloudflare, follow these steps:
🔐 SPF Record (Sender Policy Framework)
This is a TXT record.
Step-by-step:
-
Log in to your Cloudflare Dashboard.
-
Select your domain.
-
Go to the DNS tab.
-
Click “Add record”.
-
Choose:
-
Type:
TXT
-
Name:
@
(or your domain/subdomain if needed) -
Content: e.g.
iniv=spf1 include:spf.yourmailserver.com ~all
-
-
Click Save.
📌 If you already have an SPF record, update the existing TXT record — don’t add multiple SPF records for one domain.
🔑 DKIM Record (DomainKeys Identified Mail)
Also a TXT record, but added under a selector subdomain.
Step-by-step:
-
Get your DKIM selector and value from your email provider (e.g.,
default._domainkey.yourdomain.com
). -
In Cloudflare DNS:
-
Type:
TXT
-
Name:
selector._domainkey
(replaceselector
with your actual one, likedefault
ormail
) -
Content: Paste the long DKIM key starting with
v=DKIM1;...
-
-
Click Save.
✅ Verify the Records
Use tools like:
To update SPF and DKIM records via cPanel, follow these steps:
🔐 SPF Record in cPanel
➤ Method 1: Use cPanel’s built-in tool (if available)
-
Log in to cPanel.
-
Scroll down to the Email section.
-
Click on Email Deliverability.
-
Find your domain, then click “Manage”.
-
Scroll to the SPF section:
-
Click “Install the Suggested Record” if not already active.
-
Or Edit the SPF record manually if needed.
-
-
Click Save.
➤ Method 2: Add/Edit TXT Record Manually
-
Go to the Zone Editor in cPanel.
-
Click Manage next to your domain.
-
Look for a TXT record with:
-
Name: your domain (e.g.,
yourdomain.com
) -
Type:
TXT
-
Value: something like
iniv=spf1 include:spf.mailprovider.com ~all
-
-
If it doesn’t exist, click Add Record:
-
Type:
TXT
-
Name:
@
or your domain -
TTL: leave default
-
Record: your SPF string
-
-
Click Save Record
✅ Only one SPF record per domain is allowed. Combine if needed.
🔑 DKIM Record in cPanel
-
Go to Email Deliverability in cPanel.
-
Under your domain, click Manage.
-
Scroll to the DKIM section.
-
If DKIM is not enabled, click “Install the Suggested Record”.
-
If you’re using a 3rd-party mail provider:
-
Get the DKIM selector and key from them.
-
Go to Zone Editor > Manage.
-
Add a TXT record:
-
Name:
selector._domainkey
(e.g.,default._domainkey
) -
Type:
TXT
-
TTL: default
-
Record:
v=DKIM1; k=rsa; p=...
(long key from provider)
-
-
🔍 Verify the Records
Use:
Last Update: June 6, 2025