SPF vs DKIM

SPF vs DKIM compared: SPF authorizes sending IPs via DNS, DKIM cryptographically signs messages. You need both for DMARC.

SPFDKIM
RFC72086376
What it authenticatesEnvelope sender (MAIL FROM)Message content (From header)
How it worksIP-based: checks sending IP against DNS TXT recordCryptographic: verifies digital signature in email header
Survives forwardingNo (forwarding changes the IP)Yes (signature travels with the message)
DNS recordTXT at root: v=spf1 ...TXT at selector._domainkey: v=DKIM1; k=rsa; p=...
DNS lookupsUp to 10 per evaluation1 (to fetch the public key)
Can be broken byNew sending IP not in the recordKey rotation without DNS update

Technical details

SPF and DKIM are complementary email authentication protocols: SPF (RFC 7208) authorizes sending IP addresses via a DNS TXT record, while DKIM (RFC 6376) cryptographically signs message content with a private key.

DMARC requires at least one of SPF or DKIM to pass AND align with the visible From header domain; using both provides redundancy when one mechanism fails.

SPF breaks when email is forwarded (the forwarding server's IP is not in the original SPF record), while DKIM survives forwarding because the cryptographic signature travels with the message content.

Frequently asked questions

Can I have SPF without DKIM?+

Yes, but DMARC alignment will fail whenever the mail is forwarded or the sending IP is not in your SPF record. DKIM provides forward-safe authentication.

Can I have DKIM without SPF?+

Yes, but SPF provides IP-level authorization that DKIM does not. DKIM alone cannot prevent IP spoofing if the signing key is compromised.

Which is more important for deliverability?+

Both matter. Gmail and Microsoft require both SPF and DKIM to pass for bulk senders. DKIM is slightly more critical because it survives forwarding.

Check your domain with our free tools: SPF checker, DMARC checker, DKIM checker.

Last verified: 2026-10-28