SPF, DKIM & DMARC: The 2026 Setup Guide
What SPF Does in Plain Language
Imagine your domain is a nightclub and receiving mail servers are bouncers holding a guest list. SPF is the list taped to the podium: it tells the world exactly which servers are allowed to send email using your domain name.
Technically, SPF is a DNS TXT record starting with v=spf1 that authorizes senders — your mail provider, your CRM, your marketing platform. When a receiving server gets a message claiming to be from you, it checks the list. On the list? Proceed. Not on the list? That's suspicious.
One hard limit to respect from day one: SPF lookups are capped at 10. Stack too many include entries — the usual cause is connecting tool after tool without ever cleaning up — and the check fails with permerror. Keep your record lean.
Learn how SPF fits into clean sending
What DKIM Does in Plain Language
If SPF is the guest list, DKIM is a wax seal pressed into the envelope flap. It doesn't say who is allowed to send — it proves the message wasn't opened, altered, or forged somewhere along the way.
Here's how it works: your mail server attaches a cryptographic signature to every outgoing message, generated from a private key only you hold. The matching public key lives in your DNS as a TXT record. Receiving servers use it to verify the signature. Valid? The message is authentic and unaltered. Broken or missing? Something is wrong.
One reason DKIM matters more than many realize: unlike SPF, which breaks when a message is forwarded, DKIM signatures usually survive forwarding intact. In a world where forwarding is common, that's a meaningful advantage.
What DKIM proves about your mail
What DMARC Does in Plain Language
SPF and DKIM are useless without instructions. Imagine installing a state-of-the-art security system and never telling it what to do when someone breaks in. That's a domain with SPF and DKIM but no DMARC.
DMARC is a DNS record that tells receiving servers exactly what to do when SPF or DKIM checks fail for your domain:
none— do nothing; just send me reports. Use this for monitoring.quarantine— treat suspicious messages as spam. Use this once legitimate mail passes consistently.reject— refuse delivery outright. Use this only when you're confident.
DMARC also generates the aggregate reports that show you exactly who is sending mail using your domain — including anyone you didn't authorize. That visibility is half the value.
How DMARC enforces your policy
Step 1: Audit Everything That Sends Mail for You
Before touching DNS, make a complete list of every tool that sends email using your domain: your mail provider, CRM, marketing automation, support desk, transactional email service, calendar invites, even that one tool marketing connected last quarter and forgot about.
Then check what authentication already exists. Look up your current DNS records — many domains discover SPF was set up years ago and never updated, or that three different marketing tools were never authorized at all. You can't fix what you haven't inventoried.
Part of our email deliverability series
Step 2: Publish Your SPF Record
Create a DNS TXT record for your domain with a value like this:
v=spf1 include:_spf.google.com include:mailgun.org ~all
Replace the include entries with your actual providers — every include must match a real tool from your Step 1 audit. The ~all at the end means "softfail" any server not listed: suspicious, but not blocked outright. That's the right setting while you're still verifying.
Once everything is confirmed working — give it a week — switch to hardfail:
v=spf1 include:_spf.google.com include:mailgun.org -all
The -all means any server not explicitly listed is rejected. Also remember the hard limits: no more than 10 DNS lookups, and keep every include current. Dead entries from tools you cancelled are just wasted lookups.
Step 3: Generate DKIM Keys at 2048 Bits
Here's where many guides get lazy: they tell you to generate "a DKIM key" without specifying the strength. Don't accept the default blindly — many tools still default to 1024-bit keys, which are considered weak by modern standards.
Generate a 2048-bit RSA key pair instead. Your mail provider or DKIM generator will give you two things:
- Private key — stays on your mail server, used to sign every outgoing message. Never share it.
- Public key — goes into your DNS as a TXT record, used by the world to verify signatures.
You'll also choose a selector — a short name like default or mail2026 that identifies this key. You'll need it in the next step.
Step 4: Publish DKIM and Verify It Actually Signs
Create a DNS TXT record using your selector. If your selector is mail2026, the record name looks like this:
mail2026._domainkey.yourdomain.com
The value starts with v=DKIM1; k=rsa; followed by your public key. Once published, don't just assume it works — send a test message to an address you control and inspect the full headers. Look for dkim=pass in the Authentication-Results header. If you see dkim=fail or nothing at all, the key isn't signing yet — check that the selector matches and DNS has propagated.
Step 5: Start DMARC at None and Actually Read the Reports
With SPF and DKIM live, create a DMARC record. This is a TXT record at _dmarc.yourdomain.com with a value like this:
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com; fo=1;
Breaking it down: p=none means take no action yet — just monitor. rua= tells mailbox providers where to send the aggregate reports (use a real address you check). fo=1 requests forensic reports on any failure, not just DMARC failures.
Now the part most people skip: actually read the reports for two to four weeks. You're looking for two things: (1) your legitimate tools passing SPF and DKIM consistently, and (2) anything unfamiliar — either tools you forgot to authorize or, in rare cases, someone attempting to spoof your domain. Fix everything you find before moving on.
Step 6: Move to Quarantine, Then Reject — Never Skip Steps
Once two to four weeks of reports show your legitimate mail passing consistently, update the DMARC record to quarantine:
v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com; fo=1;
Suspicious messages now go to spam instead of inboxes. Monitor for another two to four weeks. If everything still looks clean, take the final step:
v=DMARC1; p=reject; rua=mailto:dmarc@yourdomain.com; fo=1;
Receiving servers now refuse delivery of anything that fails DMARC for your domain. Never jump straight to reject — skipping the monitoring phases is the number one cause of legitimate mail being blocked. The order is non-negotiable: authenticate, monitor, quarantine, reject.
Why skipping steps gets mail blocked
How to Read a DMARC Aggregate Report
DMARC aggregate reports arrive as XML attachments — usually daily, one per mailbox provider. They look intimidating at first, but you only need to understand four sections:
<report_metadata>— who sent the report and when. Tells you which provider is reporting.<record>→<row>→<source_ip>— the sending server's IP. Lets you identify who's sending.<row>→<policy_evaluated>→<disposition>— what happened:none,quarantine, orreject. Shows enforcement in action.<auth_results>→<dkim>and<spf>— pass or fail for each check. This is where you spot problems.
What you're really looking for: unfamiliar sending sources. If you see an IP you don't recognize, it's either a tool you forgot to authorize — go back and fix it — or, in rare cases, someone attempting to spoof your domain. Either way, now you know.
Pair authentication with email verification
Verify Everything with a Live DNS Check
Here's the step that separates a finished job from an assumed one: don't just publish records and walk away. Use a live DNS deliverability checker to verify that your SPF, DKIM, and DMARC records actually resolve from the public internet — not just from your DNS provider's dashboard, which can show records that haven't propagated.
Check three things: (1) SPF resolves and shows no more than 10 lookups, (2) DKIM resolves for every selector you published, and (3) DMARC shows your intended policy — none, quarantine, or reject depending on where you are in the rollout. Re-check after every DNS change, and make it a habit to verify quarterly even when nothing changed. DNS has a way of drifting when you're not looking.
Back to the email deliverability hub
Once authentication is live, follow the cold email warmup SOP
Frequently asked questions
How long does SPF, DKIM & DMARC setup take?
Most domains complete SPF and DKIM within an hour — the changes are simple DNS records. Plan on two to four weeks of DMARC monitoring at none before moving to quarantine, and another two to four weeks before reject. Rushing to reject is the number one cause of legitimate mail being blocked.
Do I need SPF if I already have DKIM?
Yes. SPF and DKIM protect different things — SPF authorizes the sending server, DKIM proves the message was not altered. Most mailbox providers check both, and DMARC passes when either one aligns. Skipping SPF is like locking the front door while leaving the garage wide open.
What happens if I set DMARC to reject too early?
Receiving servers will reject any message that fails DMARC — including legitimate mail from tools you forgot to authorize. Start at none, review the aggregate reports for two to four weeks, authorize everything you see, and only then move to quarantine and finally reject.
How often should I review DMARC reports?
Weekly is enough for most domains. Look for unfamiliar sending sources — those are either tools you forgot to authorize or, in rare cases, someone attempting to spoof your domain. Once you reach reject and the reports show only your own sources, monthly check-ins are fine.
Can I use DMARC without SPF or DKIM?
Technically yes, but it does nothing useful — DMARC only works when SPF or DKIM checks exist to pass or fail. Set up SPF and DKIM first, confirm they pass in the DMARC reports, and only then enforce a policy. The order matters: authenticate, then enforce.
Judge the data before you spend a dollar
Tell us your trade and metro. We send a capped back-catalogue sample — up to 10 rows, and no more than 25% of the territory's verified count — free, or use the same form to request founding-cohort access to the signal feed.