SPF, DKIM, and DMARC: Setup Guide for Email Authentication
Step-by-step guide to setting up SPF, DKIM, and DMARC records for your domain. DNS examples, testing, and common mistakes to avoid.
If you send email from your own domain — whether for cold outreach, marketing, or transactional messages — you need SPF, DKIM, and DMARC configured correctly. Without them, your emails will land in spam.
Since Google and Yahoo's 2024 authentication requirements, these three protocols are no longer optional. This guide walks you through setting up each one, step by step.
Why Email Authentication Matters
Email authentication serves three purposes:
As of 2026, all major inbox providers (Gmail, Outlook, Yahoo, Apple Mail) require SPF and DKIM at minimum. DMARC is required for bulk senders (5,000+ emails/day to Gmail).
Part 1: SPF (Sender Policy Framework)
What SPF Does
SPF is a DNS record that lists which mail servers are authorized to send email on behalf of your domain. When a receiving server gets an email from your domain, it checks your SPF record to verify the sending server is authorized.
Step-by-Step Setup
Step 1: Identify all services that send email for your domain
Common sending services:
include:_spf.google.cominclude:spf.protection.outlook.cominclude:sendinblue.cominclude:sendgrid.netinclude:mailgun.orginclude:amazonses.comStep 2: Create your SPF record
Format: v=spf1 [includes] [mechanism]
Example for a company using Google Workspace and Brevo:
v=spf1 include:_spf.google.com include:sendinblue.com -all
Step 3: Add the DNS record
@ (root domain)SPF Rules and Limits
include: counts as one)-all (hard fail) not ~all (soft fail) for strongest protectionv=spf1Common SPF Mistakes
ip4: for static IPs instead of includesPart 2: DKIM (DomainKeys Identified Mail)
What DKIM Does
DKIM adds a cryptographic signature to every email you send. The receiving server verifies this signature against a public key in your DNS, confirming:
Step-by-Step Setup
Step 1: Generate DKIM keys
Your email provider generates these. The process varies:
Step 2: Add DNS records
Your provider will give you a CNAME or TXT record to add. Typically:
selector._domainkey.yourdomain.comExample CNAME:
google._domainkey.yourdomain.com → dkim.googlehosted.com
Step 3: Enable DKIM signing
After adding the DNS record (allow 24-48 hours for propagation), enable DKIM signing in your email provider's settings.
DKIM Best Practices
Part 3: DMARC (Domain-based Message Authentication, Reporting & Conformance)
What DMARC Does
DMARC tells receiving servers what to do when an email fails SPF or DKIM checks. It also sends you reports about authentication results, so you can monitor for issues or abuse.
The Three DMARC Policies
Step-by-Step Setup
Step 1: Start with monitoring (p=none)
Add this TXT record to your DNS:
_dmarc.yourdomain.comv=DMARC1; p=none; rua=mailto:[email protected]Step 2: Monitor reports for 2-4 weeks
DMARC reports come as XML files to your specified email. Use a free DMARC report analyzer to read them. Check for:
Step 3: Tighten to quarantine
After confirming all legitimate emails pass authentication:
v=DMARC1; p=quarantine; rua=mailto:[email protected]; pct=100
Step 4: Enforce with reject
After 2-4 more weeks of clean reports:
v=DMARC1; p=reject; rua=mailto:[email protected]; pct=100
DMARC Alignment
DMARC requires either SPF or DKIM to "align" with the From header domain:
Most email providers handle alignment automatically, but third-party senders sometimes cause issues.
Testing Your Setup
After configuring all three records, verify everything works:
- SPF: PASS
- DKIM: PASS
- DMARC: PASS
Troubleshooting Common Issues
"SPF PermError"
"DKIM fail"
"DMARC fail"
Complete DNS Record Example
For a domain using Google Workspace + Brevo:
| Type | Host | Value |
|---|---|---|
| TXT | @ | v=spf1 include:_spf.google.com include:sendinblue.com -all |
| CNAME | google._domainkey | dkim.googlehosted.com |
| TXT | mail._domainkey | (Brevo DKIM public key) |
| TXT | _dmarc | v=DMARC1; p=reject; rua=mailto:[email protected] |
Key Takeaways
Check your domain health for free
Try FreeFrequently Asked Questions
Do I need SPF, DKIM, and DMARC?
How long does it take for DNS records to propagate?
Can I have multiple DKIM records?
What happens if DMARC is set to reject?
How do I read DMARC reports?
Ready to automate your outreach?
FatihAI finds leads, verifies emails, and sends AI-personalized sequences. Start free with 50 leads/month.
Start Free TrialRelated Articles
How to Write Cold Emails That Get Replies in 2026 (Templates + Examples)
Learn proven cold email strategies, templates, and AI-powered personalization techniques that achieve 30-50% reply rates. Includes 7 ready-to-use templates.
Email Verification: The Complete Guide to Reducing Bounce Rates (2026)
Learn how email verification works, why it matters for deliverability, and how to reduce bounce rates by 90%. Includes technical deep-dive and tool comparison.
15 B2B Lead Generation Strategies That Actually Work in 2026
Proven B2B lead generation strategies ranked by cost, effort, and ROI. From AI outreach to content marketing, find what works for your business.