SPF, DKIM and DMARC Explained: Fix Email Deliverability in One Afternoon
Three DNS records, no software, no cost. The tricky part isn't publishing them — it's alignment, which is why so many domains pass SPF and DKIM and still fail DMARC.
The short answer
SPF, DKIM and DMARC are three DNS records that together prove an email really came from your domain. SPF lists which servers are allowed to send as you. DKIM signs each message with a private key so the receiver can verify it wasn't altered. DMARC ties the two to the address your recipients actually see, and tells inboxes what to do when neither one lines up. You need all three — SPF and DKIM on their own prove very little, because neither checks the From: address a human reads.
All three are published as TXT records in your domain's DNS. There is no software to install and no cost. An afternoon is genuinely enough.
What each record actually does
- SPF (Sender Policy Framework) — a single TXT record at your root domain naming the servers permitted to send mail for it. The receiving server compares the sending IP against that list. SPF checks the hidden envelope sender (the
Return-Path), not the visibleFrom:address. - DKIM (DomainKeys Identified Mail) — your mail provider signs every outgoing message with a private key and publishes the matching public key in DNS under a selector. The receiver fetches the key and verifies the signature, which proves both who sent the message and that the body and headers weren't modified in transit.
- DMARC (Domain-based Message Authentication, Reporting and Conformance) — a policy record at
_dmarc.yourdomain.comthat does two things SPF and DKIM can't: it requires the domain that passed SPF or DKIM to match the visible From: address (this is called alignment), and it tells the receiver what to do when nothing matches — nothing, quarantine, or reject.
Alignment is the part that makes DMARC worth doing. Without it, a spammer can send from a domain they control, pass their own SPF and DKIM perfectly, and still put your brand in the From: field. DMARC is what closes that gap.
The records, ready to copy
Replace the placeholders and publish each one as a TXT record at your DNS host. SPF and DMARC are yours to write; DKIM is generated by your mail provider, so you copy rather than compose it.
SPF — one record, at the root domain
Google Workspace: v=spf1 include:_spf.google.com ~all. Microsoft 365: v=spf1 include:spf.protection.outlook.com -all. Sending through a service too? Add its include to the same record — v=spf1 include:_spf.google.com include:sendgrid.net ~all. You may only publish one SPF record per domain; two records is a permanent failure, not a merge. The record also has a hard limit of 10 DNS lookups, and each include counts.
DKIM — generated by your provider, pasted into DNS
Google Workspace: in the Admin console open Apps → Google Workspace → Gmail → Authenticate email, generate a 2048-bit key, and publish the TXT record it gives you at the host google._domainkey. Microsoft 365 is different — it uses two CNAME records rather than a TXT, at selector1._domainkey and selector2._domainkey, so that Microsoft can rotate keys without touching your DNS. Sending services (Mailchimp, SendGrid, Postmark, Klaviyo) each hand you their own selector; add every one you send from.
DMARC — start permissive, then tighten
Publish at the host _dmarc: v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com; pct=100. That asks receivers to report what they see without changing how anything is delivered. Leave it for two to four weeks and read the reports before you touch the policy.
Not sure what's already published? CheckSEO's Email Deliverability Checker reads your live DNS and reports your SPF record, your DMARC policy, and which DKIM selector it found — plus the specific misconfigurations, like an SPF record ending in +all, that quietly undo the rest of the setup. No signup.
Why Gmail and Yahoo made this urgent
Since February 2024, Gmail and Yahoo have required anyone sending more than 5,000 messages a day to personal accounts to authenticate with SPF, DKIM and DMARC, keep their spam complaint rate below 0.3%, and offer one-click unsubscribe (RFC 8058) in marketing mail. Microsoft applied effectively the same rules to Outlook.com, Hotmail and Live from 5 May 2025.
Two things about that threshold get misread. First, it counts messages to personal mailboxes on that provider, not your total send. Second, the requirements below the threshold are softer, not absent — unauthenticated mail from a small domain still lands in spam far more often, it just isn't rejected outright. If you send any transactional mail at all, treat the bulk rules as the standard.
The rollout: none → quarantine → reject
Do not publish p=reject on day one. DMARC enforcement applies to every system that sends as your domain, and almost every organisation has forgotten one — an invoicing tool, a CRM, a help desk, an old marketing platform nobody logs into. Jumping straight to reject makes that mail vanish silently.
The sequence that works: publish p=none with a rua address and collect aggregate reports for two to four weeks. Those XML reports name every IP sending as you, so use them to find the systems you forgot and add each to SPF or DKIM. When the reports show your legitimate mail passing and aligning, move to p=quarantine — failures go to spam, where you can still retrieve them. Sit there for another few weeks, confirm nothing legitimate is landing in the quarantine bucket, then move to p=reject. The pct tag lets you apply a new policy to a fraction of mail first (p=quarantine; pct=25) if you want an even gentler ramp.
When SPF and DKIM pass but DMARC still fails
This is the single most confusing failure mode, and the answer is always alignment. DMARC doesn't ask "did SPF pass?" — it asks "did SPF pass for the same domain as the visible From: address?"
The usual culprit is an email service provider that sends on your behalf using its own bounce domain. SPF passes, because the envelope sender is the ESP's domain and the ESP's IP is in the ESP's SPF record — but the From: header says your domain, so the two don't align and DMARC fails. The fix is to set up a custom return-path (sometimes called a custom bounce domain or CNAME sending domain) with that provider, and to enable DKIM signing with your own domain in the d= tag. DKIM alignment is generally the more reliable of the two to rely on, because it survives forwarding — SPF usually doesn't, since the forwarding server's IP was never on your list.
How to verify it works
Send a message to a Gmail address you control, open it, and use "Show original". The header panel lists SPF, DKIM and DMARC with a PASS or FAIL for each — that is the receiving server's own verdict, which makes it more trustworthy than any simulation. Check the d= value in the DKIM line matches your domain, not your provider's.
For the DNS side, confirm the records resolve before you blame the mail flow: a DNS lookup on your domain's TXT records will show your SPF record and, at _dmarc.yourdomain.com, your policy. Propagation is usually minutes but can take up to the TTL you set. And if authentication is passing but delivery is still poor, the problem has moved downstream — check that the sending IP's reverse DNS resolves to a matching hostname, which most large receivers treat as a baseline requirement alongside DMARC.
Check what your domain publishes right now
CheckSEO's Email Deliverability Checker queries your live DNS for SPF, DKIM and DMARC in one pass and tells you which of the three is missing, which is present but weak, and what the policy is currently set to — the fastest way to find out whether your afternoon of work is actually live.
Frequently asked questions
Does DMARC require SPF and DKIM?
DMARC needs at least one of them to pass and align with the visible From: address, so a domain with neither can never pass DMARC. In practice you want both: SPF breaks when mail is forwarded, while DKIM signatures survive forwarding, so the two cover different failure modes.
Why does DMARC fail when SPF and DKIM both pass?
Because of alignment. DMARC checks that the domain which passed SPF or DKIM matches the domain in the From: header. An email service provider sending with its own bounce domain passes SPF for that domain, not yours. Fix it with a custom return-path and DKIM signing under your own domain.
How many SPF records can a domain have?
Exactly one. Publishing two SPF TXT records is a permanent failure rather than a merge, so when you add a new sending service you extend the existing record with another include instead of creating a second one. The record is also capped at 10 DNS lookups, and every include counts toward it.
What DMARC policy should I start with?
Start with p=none and a rua address so receivers report what they see without changing delivery. Read those reports for two to four weeks to find every system sending as you, authenticate each one, then move to p=quarantine and finally p=reject once legitimate mail is passing cleanly.
How do I verify SPF, DKIM and DMARC are working?
Send a message to a Gmail address you control and open Show original. Gmail lists SPF, DKIM and DMARC with a PASS or FAIL — the receiving server's own verdict. Check the DKIM d= value shows your domain rather than your provider's, which confirms alignment as well as signing.
Check your own site with the Email Deliverability Checker.
Open Email Deliverability CheckerMore from the blog
Reverse DNS Lookup: What PTR Records Are and How to Check Yours
Reverse DNS lookup explained: what a PTR record is, why mail servers demand one, how to read dig -x output, and how to get a PTR set at common hosts.
How Old Is a Domain, and Does It Actually Matter for SEO?
Domain age itself isn't a ranking factor, despite what most SEO advice implies. See what actually correlates with it, and check any domain's real age free.