SPF, DKIM and DMARC: The Three Records, Alignment and a Safe Path to Reject

SPF, DKIM and DMARC decide whether mail from your domain is trusted. Here's how each record works, the limits that break them, how alignment really works, and a safe path from p=none to p=reject.

Pixel-art stack of envelopes beside a shield, for the DNS records that prove mail really comes from your domain.

SPF, DKIM and DMARC are three DNS records that prove email from your domain is really yours. SPF lists the servers allowed to send. DKIM signs each message with a key. DMARC checks that one of them passes for the domain in your From line, then tells receivers what to do when it fails.

Most guides stop there. They show three records, say "set them up" and move on. Then a team adds a fourth tool to SPF, breaks the lookup limit, and half its mail fails for a week before anyone notices.

This guide goes deeper. It covers what each record checks, the limits written into the specs, how alignment really works, how to read the result in a header, and a safe path from monitoring to reject. It also covers what changed in May 2026, when DMARC got a new standard.

Key takeaways

  • SPF has a hard limit of 10 lookups. Go over it and SPF fails for every email you send.
  • DKIM is the record that carries you. It survives forwarding, and it aligns with your From domain when you set a custom key.
  • DMARC only cares about alignment. A pass for your vendor's domain counts for nothing.
  • Ramp by stream, not by percent. The new DMARC spec retires pct, so move one subdomain at a time.
  • Someone has to read the reports. A reject policy with no owner is a silent outage waiting to happen.

What do SPF, DKIM and DMARC actually check?

Each record answers one question for the receiving mail server. The trick is that they check three different domains, and only DMARC ties them together.

Record Question it answers Domain it checks Where it lives in DNS
SPF Is this server allowed to send for the domain? The bounce address (return path) TXT on the domain itself
DKIM Was this email signed by the domain, and is it unchanged? The d= domain in the signature TXT at selector._domainkey
DMARC Does a pass match the From domain the reader sees? The visible From address TXT at _dmarc

SPF is a list of IP addresses and services allowed to send. DKIM is a digital signature added to each email. DMARC is a policy plus a reporting address.

Here's the part people miss. The reader only sees the From line. SPF never looks at it. DKIM only looks at it if you tell your tool to sign as your domain. DMARC is the record that finally asks, "Does any of this match what the human sees?"

How does a receiver run the checks?

The order is simple. The receiver checks SPF against the bounce address. It checks each DKIM signature against the key in DNS. Then DMARC asks if either pass lines up with the From domain. If one does, the email passes DMARC. If none does, the receiver looks up your policy and acts on it.

Flow from SPF to DKIM to alignment to policy, with the alignment step in orange as the test DMARC adds.Flow from SPF to DKIM to alignment to policy, with the alignment step in orange as the test DMARC adds.
SPF and DKIM each check a different domain. DMARC asks if either matches the From line, then applies your policy.

You need only one aligned pass. That's why DKIM matters so much. Two aligned passes give you a spare when one breaks.

How does SPF work, and where does it break?

SPF is one TXT record on your domain that starts with v=spf1. It lists who may send, then ends with a rule for everyone else.

example.com.  TXT  "v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.10 ~all"

The SPF spec, RFC 7208, sets out the rules. It says SPF records must be published as TXT records. It checks the MAIL FROM address, also called the return path or bounce address. It also recommends checking the HELO name, the name a server gives when it connects.

What does the ending mean?

The last part of the record says what to do with servers you didn't list. RFC 7208 defines four qualifiers.

Ending Result What it tells receivers
-all Fail This server is not allowed to send for us
~all Softfail This server is probably not allowed
?all Neutral We make no claim either way
+all Pass Anyone may send for us. Never use this

If nothing matches and there's no ending, the default is neutral. That's as good as having no SPF at all.

I start with ~all while I'm still finding every tool that sends as the domain. Once DMARC reports are clean, I switch to -all. With DMARC in place, the difference is small, because DMARC makes the final call.

The 10-lookup limit

This is the rule that breaks the most setups. RFC 7208 says receivers must cap DNS lookups at 10. The terms that count are include, a, mx, ptr, exists and the redirect modifier. Go over 10 and the result is a permanent error, called permerror.

A permerror is not a fail for one tool. SPF fails for every email from the domain. And nested lookups count too. If a vendor's include contains three more includes, that's four lookups, not one.

The spec also says receivers should cap "void lookups" at two. A void lookup is a query that comes back empty. Old includes for tools you cancelled years ago often do this.

Only one SPF record

RFC 7208 says a domain must not have more than one SPF record. If a receiver finds two, the result is a permerror. This happens when a new tool's setup guide says "add this SPF record" and someone adds a second one instead of merging.

SPF problem What the receiver sees Fix
Two v=spf1 records Permerror on every email Merge into one record
More than 10 lookups Permerror on every email Remove dead includes, move tools to subdomains
More than 2 void lookups Often a permerror Remove includes for tools you no longer use
Tool not listed Softfail or fail for that tool Add its include, or rely on its aligned DKIM

Why subdomains fix most SPF problems

You don't need every tool on your root domain. Put your newsletter on news.example.com and your product mail on mail.example.com. Each subdomain gets its own SPF record with its own 10 lookups.

This also keeps reputations apart. If a marketing blast draws complaints, your invoices on another sending domain aren't dragged down with it. The transactional email setup guide covers how to split product and marketing streams.

How does DKIM work?

DKIM adds a signature to the header of each email. The sending server signs with a private key. You publish the matching public key in DNS. The receiver fetches the key, checks the signature and confirms the signed parts didn't change.

The DKIM spec, RFC 6376, says keys live under a subdomain named _domainkey. A selector picks which key to use. So a signature with selector s1 for example.com points the receiver to this name:

s1._domainkey.example.com.  TXT  "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A..."

What the signature header tells you

Every DKIM signature carries a few tags worth knowing. You'll see them when you debug.

Tag Meaning Why you care
d= The signing domain DMARC compares this to your From domain
s= The selector Tells you which DNS record holds the key
h= The headers that were signed The From header must be in this list
bh= A hash of the body Changes if anything edits the body in transit
l= How much of the body was signed Best left out, so the whole body is covered

The d= tag is the one that matters for DMARC. RFC 6376 calls it the domain "claiming responsibility" for the message. If your email tool signs with d=vendor.com, DKIM passes for the vendor. It does nothing for you.

Key size and rotation

RFC 6376 says signers must use RSA keys of at least 1024 bits for long-lived keys. Yahoo's sender best practices also call for a minimum of 1024 bits. I use 2048 bits wherever the DNS host allows it. Some hosts cap TXT values, so a long key may need to be split into chunks.

Selectors make rotation easy. Publish a new key under a new selector, switch signing to it, then remove the old key a few weeks later. No downtime. I'd rotate at least once a year, and right away when someone with access to the keys leaves.

Why DKIM is the record that carries you

SPF breaks when mail is forwarded. The forwarding server isn't on your list, so SPF fails at the final stop. DKIM usually survives, because the signature travels with the message. It only breaks if something along the way edits the signed headers or the body, like a mailing list that adds a footer.

That's why I treat aligned DKIM as the must-have and SPF as the backup. Set up custom DKIM in every tool that sends as your domain. Most email tools have a setting for it. It's usually a CNAME record that points to the vendor's key, so the vendor can rotate keys without you touching DNS.

How does DMARC work?

DMARC is a TXT record at _dmarc on your domain. It does three jobs. It sets the alignment rule, sets a policy for mail that fails, and asks receivers to send you reports.

_dmarc.example.com.  TXT  "v=DMARC1; p=none; rua=mailto:dmarc@example.com; adkim=r; aspf=r"

The core spec is now RFC 9989, published in May 2026. It replaces RFC 7489, the version most guides still quote. Here are the tags in the new spec that you'll actually use.

Tag What it does Default
p= Policy for the domain: none, quarantine or reject No default, set it
sp= Policy for subdomains that exist Same as p
np= Policy for subdomains that don't exist Falls back to sp, then p
adkim= DKIM alignment: relaxed (r) or strict (s) r
aspf= SPF alignment: relaxed (r) or strict (s) r
rua= Where to send aggregate reports None
ruf= Where to send failure reports None
t= Test mode flag, y or n n

What is alignment?

Alignment is the heart of DMARC. A pass only counts if the domain that passed matches the From domain.

There are two modes. Strict means the domains must be identical. Relaxed means they must share the same main domain, which the spec calls the Organizational Domain. So with relaxed mode, a DKIM signature for mail.example.com aligns with a From address at example.com.

Relaxed is the default, and it's what I use. Yahoo's page says relaxed alignment is acceptable for bulk senders. Strict mode only adds risk unless you have a specific reason for it.

What changed in the new DMARC spec?

The announcement from DMARC.org lists the main changes. Three matter for a growing company.

  1. New tags. The np= tag sets a policy for subdomains that don't exist. Spammers love to fake those, like billing-update.example.com.
  2. Retired tags. The pct=, rf= and ri= tags are deprecated. So the old trick of applying a policy to 25% of mail rests on a tag the spec no longer backs.
  3. Split reporting specs. Aggregate reports now have their own spec, RFC 9990. Failure reports have theirs, RFC 9991.

The new spec also drops the Public Suffix List. Receivers now find your main domain by walking up the DNS tree. For most companies, nothing changes in practice. Receivers will update at their own pace, so a record that works today keeps working.

How do you read SPF, DKIM and DMARC results in a header?

Dashboards lie. Headers don't. Send a test email to an inbox you control at Gmail or Yahoo, open the original message and find the Authentication-Results header.

Authentication-Results: mx.google.com;
       dkim=pass header.i=@example.com header.s=s1;
       spf=pass smtp.mailfrom=bounces.vendor.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=example.com

Read it in three passes.

  1. Check the DKIM line. Does header.i or header.d show your domain? If it shows the vendor's domain, you haven't turned on custom DKIM.
  2. Check the SPF line. Look at smtp.mailfrom. If it's the vendor's bounce domain, SPF passed for them, not for you. That's normal and fine if DKIM is aligned.
  3. Check the DMARC line. It should say pass, with header.from matching your domain. The dis= part shows what the receiver did with it.

If DMARC passes only because of SPF, you have one point of failure. Fix DKIM before you move past monitoring.

What do Google and Yahoo require?

Both publish their rules, and both are in force. Google's email sender guidelines took effect on February 1, 2024. They split senders into two groups: everyone, and senders of 5,000 or more messages a day to personal Gmail accounts. Yahoo uses the same split.

Requirement All senders Bulk senders
SPF and DKIM SPF or DKIM Both SPF and DKIM
DMARC Not required Published and passing, p=none allowed
Alignment Not required From domain aligned with SPF or DKIM
Spam rate Below 0.3% Below 0.3%, Google's target is below 0.10%
Unsubscribe Not required One-click for marketing mail, plus a visible link
Other Valid forward and reverse DNS, TLS Same

Yahoo adds that bulk senders must honor unsubscribes within 2 days. Its page also lists the 1024-bit DKIM key minimum. The full picture of these bulk sender requirements matters most for marketing mail. But your product mail counts toward the same domain, so a fast-growing app can cross the line on notifications alone.

My advice is to set up every domain as if it were a bulk sender from day one. It costs nothing extra.

How do you move DMARC from none to reject safely?

Monitoring mode is where most companies stop. That's a mistake. At p=none, anyone can still send email that claims to be from you, and receivers will deliver it. The point of DMARC is enforcement.

Here's the path I use. It ramps one stream at a time, so it doesn't need pct.

Publish p=none with reports

Add the record with a rua address. Use a mailbox or a DMARC report tool, because the reports arrive as XML files and nobody reads those by hand for long.

Find every sender

Read two to four weeks of aggregate reports. List every source that sends as your domain. The usual list is longer than you think: the CRM, the help desk, billing, the calendar tool, HR software, the product itself and a forgotten event tool from two years ago.

Fix each sender's DKIM

For each real source, turn on custom DKIM so it signs with your domain. Set a custom bounce domain too, where the tool offers one. Kill any source you don't recognize or no longer use.

Lock down unused domains first

Domains that never send email are the easy win. Give them p=reject, an SPF record of v=spf1 -all and no DKIM. Do the same with np=reject on your main domain to cover fake subdomains.

Enforce one stream at a time

Move your quietest sending subdomain to p=quarantine with its own _dmarc record. Watch it for two weeks. Then the next one. Use sp= on the main record to set the default for the rest. When every stream is clean, set the root domain to quarantine.

Move to reject, with an owner

Once a month of reports is clean at quarantine, move to p=reject. Name one person who reads the reports every month. A new tool that someone connects without telling you will fail quietly at reject. The owner is how you catch it.

Stage Record Move on when
Monitor p=none with rua Every real sender passes with aligned DKIM for two weeks
Unused domains p=reject, v=spf1 -all Right away, they send nothing
One stream Subdomain at p=quarantine Two clean weeks on that stream
All streams Root at p=quarantine A clean month of reports
Enforce p=reject with a named owner Stay here, and review monthly

Once you're at quarantine or reject, you can also look at BIMI, which shows your logo next to your mail in some inboxes. It needs an enforced DMARC policy first.

Worked example: an SPF record that broke itself

This is a worked example with assumed numbers. It shows how a normal company drifts over the limit without anyone doing anything wrong.

Bar chart of SPF lookups: email provider 4, CRM 3, help desk 2, sequencer 2, billing tool 1, old event tool 1, total 13 against a cap of 10.Bar chart of SPF lookups: email provider 4, CRM 3, help desk 2, sequencer 2, billing tool 1, old event tool 1, total 13 against a cap of 10.
Worked example with assumed counts: six includes add up to 13 lookups, three over the limit, so SPF fails on every email. Worked example from this guide.

Say a 40-person software company sends all its mail from the root domain. Over two years, six tools got added to SPF. Each include costs one lookup, plus any includes nested inside it. Say the counts come out like this:

Include in the SPF record Lookups it costs
Email provider 4
CRM 3
Help desk 2
Sequencer 2
Billing tool 1
Old event tool 1
Total 13

That's 13 lookups against a limit of 10. Every receiver returns a permerror, so SPF fails on every email. Nobody notices at first, because DKIM still passes for the email provider and the CRM. Their mail keeps landing.

But the billing tool never had custom DKIM turned on. Its emails relied on SPF alone. Now they fail DMARC. Say the company sends 3,000 invoice and receipt emails a month, and the domain sits at p=quarantine. Those 3,000 emails go to spam.

After the fix, the root record holds the email provider, the CRM, the help desk and billing. That's 4 + 3 + 2 + 1 = 10 lookups. That's right at the limit, so I'd go one step further. Move the help desk to support.example.com too. Now the root sits at 8 lookups, with room for one more tool. That margin is the real fix. A record at exactly 10 breaks the day a vendor adds one nested include.

What are the common SPF, DKIM and DMARC mistakes?

Adding a second SPF record. A new tool's setup guide says "add this record." Someone adds it instead of merging. Now SPF is a permerror everywhere.

Trusting the vendor's green tick. The dashboard says DKIM is set up. But the tool signs with its own domain, so it never aligns. Check the header, not the dashboard. Unaligned mail also builds sender reputation for the vendor's domain, not yours.

Publishing DKIM but never turning signing on. Many tools need a second click after the DNS record is live. Until then, nothing is signed.

Staying at p=none forever. Monitoring is a phase, not a policy. At none, your domain is still easy to fake.

Jumping to reject with no reports. You'll block your own invoices, password resets or calendar invites. You find out when a customer calls.

No owner after enforcement. Someone in sales connects a new tool. It sends as your domain with no DKIM. At reject, those emails vanish without a bounce anyone sees.

Ignoring cold email domains. Your outbound domains need all three records too. The cold email deliverability setup covers that build, and the email warmup guide covers what comes after. Run your numbers through the cold email infrastructure calculator before you buy domains.

How do you check your records are live?

Query DNS yourself. Any terminal works.

dig +short TXT example.com                    # one line starting v=spf1
dig +short TXT s1._domainkey.example.com      # a v=DKIM1 key (selector varies)
dig +short TXT _dmarc.example.com             # v=DMARC1; p=...

Count your SPF lookups by hand once. Open each include and count the includes inside it. A lookup tool can do this, but doing it once by hand teaches you where the weight is.

Then run the domain through the free DMARC checker. It reads the live record, so you catch a typo before a receiver does. Online stores have the same needs, and the ecommerce email deliverability guide covers how they differ.

What should you do this week?

If you'd rather hand this off, my GTM engineering service covers email setup along with the CRM and routing work it touches.

My take: DKIM is the real record, and reject is the real goal

Most teams treat these three records as a box to tick. They publish SPF, paste a DMARC record at none and call it done. That's not authentication. That's a sign on an unlocked door.

Here's how I'd rank the work. Aligned DKIM on every tool comes first, because it survives forwarding and carries DMARC on its own. SPF comes second, kept small with subdomains so it never nears the limit. DMARC at reject is the goal, reached one stream at a time.

The new DMARC spec doesn't change that goal. It just retires the percent ramp. Ramp by stream instead, read your reports, and keep one person on the hook for them.

FAQ

Do I need all three of SPF, DKIM and DMARC?

Yes, if you send at any real volume. Google and Yahoo ask every sender for SPF or DKIM. Senders of about 5,000 or more emails a day to Gmail need both, plus a DMARC record that passes. Even small senders should set up all three. It costs nothing, and it stops others from faking your domain.

What is the difference between SPF, DKIM and DMARC?

SPF lists the servers allowed to send for a domain. DKIM adds a signature to each email that proves it came from the domain and wasn't changed. DMARC checks that one of those passes for the same domain the reader sees in the From line. Then it tells the receiver what to do with mail that fails.

Should my SPF record end in ~all or -all?

Either works once DMARC is in place, because DMARC makes the final call. A ~all ending is a soft fail and a -all ending is a hard fail. I use ~all while I'm still finding every sender, then switch to -all once the DMARC reports are clean. Never use +all, which lets anyone send.

How long should I stay at p=none?

Stay until the reports show every real sender passing with an aligned domain for at least two weeks. For a small company that's often a month. For a company with many tools sending as its domain, it can take a quarter. Don't move on a date. Move when the reports say you're ready.

Why does SPF pass but DMARC fail?

SPF checks the bounce address, not the From address. If your email tool uses its own bounce domain, SPF passes for the tool, not for you. DMARC then needs DKIM signed with your domain. Fix it by turning on custom DKIM in that tool, or by setting a custom bounce domain.

What happened to the pct tag in DMARC?

The updated DMARC standard, RFC 9989, came out in May 2026 and drops pct as a working tag. It adds a t=y test flag instead. So a ramp that leans on pct=25 rests on a tag the new spec retires. I'd ramp one sending stream at a time with subdomains and the sp tag.

More like this

Startup? Let's talk.

20 minute fit call. You'll leave knowing the first thing we'd fix and roughly what it costs. If we're not the right fit, we'll tell you who is.