Skip to main content

Proxy 25

How to Set Up SPF, DKIM & DMARC in 2026 — Proxy25
Email Authentication · Sending Infrastructure · 2026

How to Set Up SPF, DKIM & DMARC in 2026: 3-Step Email Authentication Guide

Nina spent six weeks testing subject lines, copy, and send timing on a campaign with a 3.7% open rate. The problem wasn't any of those things. It was three DNS records nobody had told her were part of the sending infrastructure.

J
Jon
Proxy25
14 min read
2026

Six weeks. Eleven variables tested. One flat, stubborn number.

Nina came to me in January. Clean sending infrastructure, verified lists, done right from day one. By the end of her third week, she'd run her first cold outbound campaign — 2,400 contacts, tight ICP, a sequence she'd written herself and felt good about. Bounce rate came in under 1.4%.

The open rate came back at 3.7%.

She went through the standard checklist methodically. Tested three subject line variants over two weeks. Moved send timing from morning to midday to Thursday afternoons. Shortened the copy twice. Rewrote the opening line four separate times. At the end of week five, nothing had moved the number by more than half a percentage point in either direction.

By Friday of week five, she had a spreadsheet with eleven variables tested and one flat, stubborn number sitting at the bottom of every column. She was starting to write it off as a list problem.

I asked her one question before we went anywhere near her copy: "Did you check the domain authentication?"

Problem 1 — SPF
The SPF record authorized senders from two platforms the company hadn't used in 18 months. Every email from Google Workspace was flagged as unauthorized.
Problem 2 — DKIM
A contractor had rotated the private key but not updated the matching public key in DNS. Every outgoing email carried a signature that couldn't be verified.
Problem 3 — DMARC
No DMARC record at all. No policy for receiving servers to follow on failure. No reports coming back to tell her any of this was happening.

We fixed all three. Two weeks later, the same sequence — same copy, same list, same timing — ran at 24%.

Before fix
3.7%
open rate · 6 weeks
After fix
24%
same copy · same list
Three DNS records. Less than one day to fix. The entire five-week detour traced back to one question nobody had thought to ask — did you check the domain authentication?

Why the same domain can be broken in three completely different ways

Nina assumed one broken thing was causing the problem. I had to explain why that assumption was wrong: SPF, DKIM, and DMARC aren't three checks on the same problem. They're answers to three completely different questions, and a domain can fail all three independently.

SPF answers
Who is allowed to send email from this domain? Without it, any mail server anywhere can claim to send from your domain, and receiving servers have no way to check whether that claim is legitimate.
DKIM answers
Was this specific message modified after it left your server? Even if the sending server is authorized, someone could intercept and alter the message in transit. DKIM prevents this through cryptography.
DMARC answers
What should receiving servers do when those checks fail — and how do I find out when they are failing? Without DMARC, SPF and DKIM failures have no consequence and produce no report. The sender is completely blind.

Nina's SPF said she was not authorized to send from her own domain. Her DKIM signature couldn't be verified. Her missing DMARC record meant she had no way to know either of those things was happening. She hadn't been failing at three things. She'd been blind to three things, in three different ways, at the same time.


1
Step One
SPF — Sender Policy Framework
"Who is authorized to send from this domain?"

What we found in Nina's record

The SPF record was the first thing we pulled up. What came back was this:

dig TXT yourdomain.com — Nina's existing record
# What the record said
v=spf1 include:servers.mcsv.net include:sendgrid.net -all
The problem: The company hadn't used Mailchimp or SendGrid in 18 months. Nina had been sending from Google Workspace since her first week — a server the domain's SPF record explicitly did not authorize. Every one of her 2,400-contact sends had been arriving from an IP that wasn't on the guest list.

The -all at the end made it worse

-all
Hard Fail
Treat mail from unauthorized sources as a definitive problem. Nina had inherited the most dangerous combination: a strict enforcement rule applied to a record nobody had maintained since before she started.
~all
Soft Fail
Accept the mail but mark it as suspicious. The right starting point when correcting a record — catch problems without causing new ones. Tighten to -all once you're confident everything legitimate is listed.

The corrected record

The fixed SPF record
# Two active, authorized senders. Soft fail to start.
v=spf1 include:_spf.google.com include:mailgun.org ~all
Start with ~all until you're confident the record is complete. Verify with MXToolbox. Then tighten to -all. This was the one part of the fix Nina made herself, once she understood the logic.

The 10-lookup ceiling — Nina will hit it again if she's not careful

The SPF specification caps DNS lookups at 10 per evaluation. Every include: statement counts as one lookup — and every include you reference may trigger its own nested lookups inside that provider's SPF record.

!

Nina's stack today is small — Google Workspace and Mailgun. But she's planning to add a transactional email provider and a marketing automation platform. With four or five services all sending from the same domain, she could exceed 10 lookups without the record looking complicated. When the limit is exceeded, SPF returns a permanent error — the exact problem she just spent five weeks diagnosing, recreated by growth instead of neglect. Also: never publish two separate SPF TXT records on the same domain. The specification treats multiple SPF records as an error. Edit the existing one in place.


2
Step Two
DKIM — DomainKeys Identified Mail
"Was this message modified after it left the server?"

The problem that wasn't neglect — it was a job half-finished

The SPF problem had been born from nobody paying attention. The DKIM problem, once we traced it, was the opposite — someone had actively tried to do the right thing, and stopped halfway through.

A contractor had configured DKIM before Nina arrived. At some point during setup, they rotated the private key — a reasonable security practice. They updated the private key on the sending server. They did not update the matching public key in DNS.

From that day forward, every email the company sent was signed with private key version 2, while every receiving server retrieved public key version 1 from DNS. The two keys never corresponded. Every DKIM verification failed. Every one of her emails still delivered — which is exactly why nobody had caught it.

!

DKIM failure doesn't bounce the email. The message goes through. The failure is recorded silently in the message headers — a dkim=fail entry in the Authentication-Results field. Six weeks of sending where every outgoing message carried a cryptographic signature that said, to any server that checked, "this message cannot be verified" — and no alert, no bounce, nothing in her inbox to tell her.

What DKIM is actually doing when it works

1
Your mail server generates a hash of the message — body content and specific headers including From, To, Subject, and Date
2
The hash is encrypted using the private key (which never leaves your server) and travels with the message as a DKIM-Signature header
3
The receiving server reads the header, finds the selector and signing domain, and retrieves the matching public key from DNS
4
The server decrypts the signature and compares it against its own hash of the message. Match = verified. Mismatch = failure.

The selector — the one piece that would have saved Nina five weeks

The correct key rotation process

Every DKIM record lives at an address that includes a selector — a label telling the receiving server which key to use. Format: selector._domainkey.yourdomain.com

The selector exists to support rotation without breaking email in transit. The correct process: generate the new key pair → publish the new public key under a new selector (not the existing one) → switch the server to sign with the new private key → leave the old selector live in DNS for 48 hours → then remove it.

The contractor had skipped this entirely — overwriting the existing selector's public key with the new one. The fix took five minutes: publish the current public key under the selector the sending server was actually referencing. Five minutes to undo two months of silent failure.

Two things Nina now checks on a recurring basis

Use 2048-bit keys — the 1024-bit standard is deprecated. Rotate keys every 6 to 12 months — nothing reminds you to do this, so put a recurring calendar event on it. To verify DKIM is working: send a test email to a Gmail address you control, open the raw headers (three-dot menu → Show original), and find the Authentication-Results header. dkim=pass means it's working. dkim=fail or dkim=none means the key in DNS doesn't match the key the server is signing with.


3
Step Three
DMARC — Domain-based Message Authentication
"What should servers do when checks fail — and how do I find out?"

The missing policy, and the missing signal

When Nina found out her SPF was broken and her DKIM was failing, she asked me a reasonable question: why hadn't anything told her this was happening?

Email authentication failures are silent by default. An SPF fail doesn't trigger a bounce. A DKIM fail doesn't trigger a bounce. Both are noted in message headers, factored into spam filtering decisions, and passed to the placement algorithm — but the sender never hears back. If Nina had published a DMARC monitoring record on day one, she would have had reports in her inbox within 24 hours. She would have found both real problems on day two instead of week five.

Publishing your first DMARC record

A DMARC record is a TXT record published at _dmarc.yourdomain.com. Nina's first record, published that same afternoon:

_dmarc.yourdomain.com — starting record
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
v=DMARC1 — version identifier  |  p=none — monitor only, no action taken on failures  |  rua= — where daily aggregate reports go
!

The p=none starting point isn't a compromise. Moving straight to p=reject without reading monitoring reports first is how teams accidentally stop their own legitimate mail from delivering. If Nina had inherited a domain with p=reject already configured on day one, her emails wouldn't have gone to spam — they wouldn't have delivered at all. Not 3.7%. Zero.

The policy progression

Stage 1
p=none
Monitor only. Read reports via a DMARC reader (Postmark, EasyDMARC, DMARC Analyzer — all have free tiers). Fix every failing source you recognize.
2 full weeks minimum
Stage 2
p=quarantine
Failing mail goes to spam. Keep watching reports for anything unexpected — forgotten CRM notification tools, old sending sources you didn't know existed.
2–4 weeks
Stage 3
p=reject
Failing mail is rejected outright. Move here only when all legitimate sending infrastructure is aligned and passing. Nina is currently three weeks into her quarantine window.
Final destination

The subdomain question

Root domain DMARC policy applies to subdomains by default. When Nina started reading DMARC reports, she discovered a transactional notification subdomain she'd forgotten existed. The sp= tag lets her enforce different policies on root vs subdomains:

Root quarantine, subdomains still monitoring
v=DMARC1; p=quarantine; sp=none; rua=mailto:dmarc@yourdomain.com
sp=none — subdomains stay in monitoring mode while you audit their authentication setup separately, before enforcing the same policy against them blind.

What it actually cost, and what the fix actually took

6 weeks
Testing the wrong things
~975
Additional opens lost to broken auth
<1 day
To fix all three DNS records

An SPF record update. A DKIM public key republished under the correct selector. A DMARC monitoring record published for the first time. Three DNS changes, a 48-hour propagation window, and the same sequence ran at 24%.

If you're staring at an open rate that doesn't move no matter what you change about the message, that's the question to ask on day one, not week five: did you check the domain authentication?


Everything you need, in the order it needs to happen

SPF
Step 1 — SPF
Run dig TXT yourdomain.com and check every include: points to a provider you're actively using
Remove stale entries. Add whatever's missing. Start with ~all, then tighten to -all once the record is complete
Run the full record through MXToolbox — verify lookup count stays below 10
One record per domain only — edit the existing one, never create a second
DKIM
Step 2 — DKIM
Send a test email to a Gmail you control and read the Authentication-Results header — dkim=pass means it's working
If it fails, check the selector and public key in DNS against what the sending server is actually using
Use 2048-bit keys. Rotate every 6–12 months — when rotating, publish the new key under a new selector and leave the old one live for 48 hours
DMARC
Step 3 — DMARC
Publish v=DMARC1; p=none; rua=mailto:your-address at _dmarc.yourdomain.com — today, before anything else
Connect the reporting address to a DMARC reader (Postmark, EasyDMARC, or DMARC Analyzer — all have free tiers)
Read two full weeks of reports. Fix every failing source you recognize. Move to p=quarantine. Then p=reject when everything is aligned and passing.

Clean lists need authenticated sends

Verification ensures your recipients are real. Authentication ensures your sends are trusted. Both are required — and neither replaces the other.

Start with 500 free credits → No credit card required