Skip to content

FREE WEBINAR: Email marketing in 2027: everything you need to know

SPF, DKIM and DMARC explained: the guide to email authentication

 

Email authentication is three DNS records doing one job, proving that mail claiming to come from your domain came from you.

Most guides explain the syntax. Very few explain the part that trips everyone up, which is alignment. So we are going to do the whole thing properly, in plain English, with every source linked at the bottom so you can check my work.

No prior knowledge assumed. If you have ever nodded along in a meeting about DMARC and quietly hoped nobody would ask you a follow-up question, start at the top.

 

Before you dig in, why don't you get access to RE:markable

 RE:markable is the weekly email about emails. Dropping the latest email marketing news, updates, insights, free resources, upcoming masterclasses, webinars, and of course, a little inbox mischief. 

 

 

Why authentication stopped being optional

For years, SPF, DKIM and DMARC sat in the recommended column. Nice to have. Something the IT team may or may not have done in 2016.

That changed. Google and Yahoo moved authentication into their published sender requirements, and from May 2025 Microsoft did the same for Outlook.com, hotmail.com and live.com. Send volume without authentication now and you are not fighting for the inbox, you are being refused at the door.

Adoption has not kept up with the requirements. EasyDMARC analysed the top 1.8 million domains in early 2026 and found 52.1 per cent with a valid DMARC record, up from 47.7 per cent the year before. Of those, 29.2 per cent sat at p=none and only 22.9 per cent were at enforcement. Just 8.9 per cent combined p=reject with aggregate reporting.

Over half of domains have a DMARC record. Most of them are watching, not protected.

 

The one minute version

Three records, three different jobs.

  • SPF lists the servers allowed to send mail for your domain.

  • DKIM puts a tamper-evident signature on each message.

  • DMARC ties those two checks to the address your reader sees in their inbox, tells receivers what to do when they do not line up, and sends you reports.

The same thing, as a letter

Think about a physical letter arriving at a sorting office.

  • SPF is the list of post offices permitted to frank mail in your name. Franked somewhere else, and the sorting office raises an eyebrow.

  • DKIM is the wax seal. If the seal is broken, something changed in transit.

  • DMARC is the instruction written on the envelope saying what to do when the frank or the seal looks wrong, plus a standing request for a report of everything posted in your name.

Keep the letter in your head. The rest of the guide makes more sense with it.

 

SPF: who is allowed to send as you

What SPF does

Sender Policy Framework, defined in RFC 7208. A single TXT record published on your domain, listing the servers permitted to send mail for it.

When your email arrives, the receiving server looks at the envelope sender, finds your SPF record in DNS, and checks whether the IP address that just connected appears on your list.

One detail to hold on to, because it matters later. SPF checks the envelope sender, the Return-Path, which is the address bounces go back to. Not the From address your reader sees in their inbox. Those two are frequently different.

 

What an SPF record looks like

v=spf1 include:_spf.google.com include:servers.mcsv.net ip4:203.0.113.4 ~all

Piece by piece:

  • v=spf1 the version. Always first, always this.

  • include: hands the check over to another provider record. One per sending platform, taken from their documentation.

  • ip4: and ip6: specific addresses or ranges you control.

  • ~all softfail. Anything not on the list is suspicious but not rejected outright.

  • -all hardfail. Anything not on the list is unauthorised. Where you want to end up.

  • +all authorises the entire internet to send as you. If you find this on your domain, fix it today.

 

How to set up SPF

1. Write down every system that sends email as your domain.

Email platform, CRM, helpdesk, invoicing, booking tool, review requests, the website contact form, payroll, the event tool from last year, and whatever somebody in finance set up without telling anyone. You cannot authorise senders you have not found.

2. Collect the include value from each provider.

Every reputable platform publishes it. Search their help centre for SPF.

3. Build one record

One SPF record per domain. Publish two and the check returns an error, so merge rather than add.

4. Publish it as a TXT record at the root of your domain.

Host or name field is usually @ or blank, depending on your DNS provider.

5. End with ~all while you verify, then tighten to -all.

Softfail first so you do not block your own mail while you are still finding senders.

6. Check it, then check it again after every platform change.

The free tools further down take about a minute.

 

The limit almost nobody warns you about

SPF allows ten DNS lookups. Ten. Set out in section 4.6.4 of RFC 7208.

Each include, a, mx, ptr, exists and redirect counts as one, and the includes nested inside those includes count too, which is where most domains quietly tip over. ip4, ip6 and all cost nothing, and the lookup for your own SPF record does not count.

Go over, and the verifier must fail the check with a permerror, which most receivers treat as SPF not passing. Your record can look immaculate and be failing silently.

Worse, mechanisms are evaluated left to right and stop at the first match, so crossing the limit may only break some of your senders, some of the time. Mailhardener has the clearest write-up of the limit I have found, linked below.

Two habits that keep you under it, remove platforms you have stopped using, and drop the default a and mx mechanisms when nothing sends from your web server or mail exchangers. Avoid ptr altogether, it is slow, unreliable and discouraged.

 

What SPF does not do

SPF checks the envelope sender, so somebody can pass SPF perfectly on their own domain while displaying your brand in the From line. On its own, SPF stops nothing a spoofer cares about.

SPF also breaks on forwarding. The forwarding server becomes the sender, the IP changes, the check fails, and there is nothing you can do about it at the SPF layer. Both of those gaps are why the next two records exist.

 

DKIM: proof the message was not altered

What DKIM does

DomainKeys Identified Mail, defined in RFC 6376. Your sending platform signs each message with a private key. The matching public key sits in your DNS.

The receiving server fetches your public key, recalculates the signature across the headers and body it received, and compares. A match tells it two things, the message came from somewhere holding your key, and nothing was changed in transit.

 

Where the key lives

selector._domainkey.yourdomain.co.uk

The selector is only a label, which is what lets you run several keys at once, one per sending platform. Your platform tells you which selector to use, and you will see it again in the s= tag of the DKIM-Signature header on any message you send.

 

How to set up DKIM

1. In your sending platform, find the authentication settings.

Named domain authentication, sending domains, email authentication or verified domains, depending on the tool.

2. Let it generate the key pair.

 It keeps the private key and hands you a DNS record to publish.

3. Publish the record.

Sometimes a TXT record containing the public key, sometimes a CNAME pointing at the provider so they can rotate the key for you. Take the CNAME when offered, fewer things to maintain.

4. Go back into the platform and press verify.

 Publishing without verifying is the single most common half-finished setup I see.

5. Repeat for every platform that sends as you.

Every one. A platform without DKIM is a platform relying entirely on SPF, which means it stops working the moment anyone forwards the email.

 

Key length, and the one algorithm to avoid

RFC 8301 updated the cryptography. Signers must use RSA keys of at least 1024 bits and should use at least 2048. Verifiers must handle 1024 up to 4096, and must not accept anything under 1024. The old rsa-sha1 algorithm must not be used for signing or verifying at all.

Yahoo asks for a minimum of 1024 bits in its own sender guidance. If your platform offers 2048, take it.

One practical snag, some DNS providers cannot accept a 2048-bit public key in a single TXT value and need it split across strings. Your provider documentation will cover the syntax, and a split record is normal, not broken.

 

What breaks DKIM

  • Mailing lists that rewrite the subject line or append a footer, which changes the signed content and invalidates the body hash.

  • A record published but never verified in the platform.

  • A CNAME still pointing at a provider you stopped paying for.

  • A key rotated at the platform end with DNS left untouched.

  • A truncated or mis-split 2048-bit TXT value.

DKIM survives forwarding where SPF does not, which is why treating SPF and DKIM as an either-or is a mistake. Set up both, everywhere.

 

DMARC: the record that makes the other two mean something

What DMARC does

Domain-based Message Authentication, Reporting and Conformance. Two jobs, and both are worth understanding separately.

  1. It ties SPF and DKIM to the From address your reader sees, which neither record does on its own, and tells receivers what to do when the connection cannot be made.

  2. It reports back, so for the first time you can see what is being sent in your name, including by people who are not you.

 

Alignment, the part every guide skips

Read this section twice, because it explains most of the confusion in email authentication.

SPF checks the Return-Path. DKIM checks the domain in its own d= tag. Neither of them looks at the From address printed in the email your reader opens.

DMARC asks one question. Does the domain that passed SPF, or the domain that signed with DKIM, match the domain in the visible From address?

Match, and DMARC passes. No match, and DMARC fails, even when SPF and DKIM both passed happily on their own. Green ticks everywhere and a failing DMARC result is not a contradiction, it is the normal symptom of misalignment.

Only one of the two needs to align. Google recommends aligning both.

Relaxed alignment, the default, means the organisational domains must match, so mail.yourdomain.co.uk aligns with yourdomain.co.uk. Strict alignment, set with adkim=s or aspf=s, demands an exact match.

The most common cause of misalignment, by a distance, is a platform sending with its own Return-Path and signing with its own domain. SPF passes for the platform. DKIM passes for the platform. Nothing aligns with you. The fix is a custom sending domain or custom Return-Path inside the platform, plus DKIM signed with your domain rather than theirs.

 

What a DMARC record looks like

Published as a TXT record at _dmarc.yourdomain.co.uk

v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.co.uk; adkim=r; aspf=r

The tags worth knowing:

  • v= the version. Required, always DMARC1, always first.

  • p= what receivers should do with mail that fails. none, quarantine or reject.

  • sp= policy for existing subdomains.

  • np= policy for subdomains that do not exist. New, and useful.

  • rua= where to send aggregate reports. The whole point of starting.

  • ruf= where to send per-message failure reports. Most large receivers do not send them.

  • adkim= and aspf= alignment mode, r for relaxed or s for strict.

  • t= test mode, y or n. New, and it replaces something you may have in your current record.

 

The 2026 update: DMARC is now RFC 9989

For eleven years DMARC lived in RFC 7489, an informational document rather than a standard. In May 2026 the work known as DMARCbis was published as RFC 9989, a Proposed Standard on the Internet Standards Track, obsoleting both RFC 7489 and RFC 9091. Reporting moved into two companion documents, RFC 9990 for aggregate reports and RFC 9991 for failure reports.

Five changes worth your attention.

pct= has been removed

The percentage tag was meant to let you apply your policy to a slice of your mail while you built confidence. In practice it was only handled accurately at 0 or 100, and the specification notes that behaviour at values in between varied widely from one implementation to another. Meanwhile pct=0 had picked up a second, unintended life as a signal to rewrite the From header.

The RFC puts it bluntly, it did not make sense to support a tag named pct that had only two valid values. It is replaced by t=y and t=n, testing on or off, with n as the default.

 

The Public Suffix List is out, the DNS Tree Walk is in

Receivers used to consult a list of public suffixes to work out your organisational domain. Now they walk up the domain tree looking for a record. Author domains with more than eight labels get shortened to seven before the walk starts, and deeply nested domains may need a record published at the author domain itself, because records at intermediate zone cuts may never be reached.

 

np= arrives, for subdomains that do not exist

A policy for non-existent subdomains, imported from the old RFC 9091. Properly useful, because inventing a subdomain you have never published is a favourite spoofing move. If np= is absent, sp= applies, and if that is absent too, p= applies.

 

psd= arrives, for public suffix operators

A flag saying whether a record belongs to a public suffix operator or an organisational domain. Mostly relevant to registry operators, worth recognising if you see it.

 

rf= and ri= are gone, and only v= is required

The report format and report interval tags have been removed. Only v= is now required in a record. p= is recommended, and if it is missing from an otherwise valid record, receivers treat it as p=none.

If you have a working record with pct= in it, nothing breaks tomorrow. Receivers will take years to move across. But if you are writing a record today, write it without pct and consider adding np.

 

How to roll out DMARC without blocking your own invoices

The sequence matters far more than the speed.

  1. Get SPF and DKIM right first, on every sending platform. DMARC with nothing underneath it is a policy about checks that were never configured.

  2. Publish p=none with a rua address. Monitoring only. Nothing is blocked, nothing changes for your readers, and the reports start arriving within a day or two.

  3. Read the reports for at least a few weeks. They arrive as XML, so use a reporting tool rather than your own eyes. Several offer a free tier that is plenty for one domain.

  4. Find every legitimate sender you forgot. The reports will surface them, and there are always more than anyone expects. Payroll, the recruitment platform, the agency, the events tool, the survey tool, the thing from 2019 nobody switched off.

  5. Fix alignment for each one, or retire it. Custom sending domain, custom Return-Path, DKIM signed with your domain. Some tools cannot align, and that is a procurement conversation, not a DNS one.

  6. Move to p=quarantine once the reports show your legitimate mail aligning. Failing mail goes to spam rather than the inbox, which is reversible.

  7. Move to p=reject once quarantine has run clean. Failing mail is refused at the door. Where you want to be, eventually.

  8. Keep reading the reports. New tools get bought, contracts change, somebody connects a platform. Your authentication is only ever correct as of the last time you looked.

Jumping straight to p=reject before the reports are clean is how businesses stop receiving their own purchase orders. The staged approach exists for a reason.

 

A record at p=none is visibility, not protection

Worth being plain about, because the gap between having DMARC and being protected by DMARC is where most domains sit.

p=none tells receivers to take no action. It gives you reporting, which is valuable and the right place to start. It satisfies the minimum that Google, Yahoo and Microsoft ask for. It does not stop anybody sending mail as your domain. Only quarantine and reject do that.

Staying at p=none for years is the email equivalent of installing a security camera and never watching the footage.

 

What the mailbox providers require

Published requirements, not folklore. Links to all three at the bottom.

Google

For senders of roughly 5,000 or more messages a day to personal Gmail accounts:

  • SPF and DKIM both required, both passing.

  • A DMARC record with a policy of at least none.

  • The organisational domain in the From header must align with either the SPF domain or the DKIM domain. Only one needs to align, though Google recommends both. Forwarded and mailing list messages are exempt.

  • One-click unsubscribe for marketing and promotional mail, implemented with List-Unsubscribe headers per RFC 8058 including an HTTPS URL. A mailto link or a landing page link does not satisfy it. Requests honoured within 48 hours.

  • Reported spam rate below 0.1 per cent, which Google recommends, and never at or above 0.3 per cent. Above 0.3 per cent you are ineligible for mitigation until you have had seven consecutive days back below it.

  • Plus TLS, valid forward and reverse DNS, and RFC 5322 message formatting.

The bounce codes to recognise, 4.7.27 for SPF failure, 4.7.30 for DKIM failure, 4.7.31 for a missing DMARC record or policy. Monitor all of it in Postmaster Tools.

 

Yahoo

  • All senders, SPF or DKIM as an absolute minimum. Bulk senders, both.

  • DMARC published with at least p=none, and DMARC must pass. From domain aligned with SPF or DKIM, relaxed alignment accepted.

  • A minimum 1024-bit DKIM key, and an active complaint feedback loop for every DKIM domain.

  • A working one-click unsubscribe, with the RFC 8058 POST method highly recommended, plus a visible unsubscribe link in the body. Honoured within two days.

  • Spam rate below 0.3 per cent, calculated on mail delivered to the inbox, which is worth remembering when you compare your own numbers.

Microsoft

From May 2025, domains sending more than 5,000 messages a day to outlook.com, hotmail.com and live.com need SPF passing, DKIM passing, and DMARC at a minimum of p=none aligned with SPF or DKIM.

The original plan was to route non-compliant mail to Junk first and reject later. The final update went straight to rejection, with the error 550 5.7.515 Access denied. Adding a sender to a Safe Senders list does not bypass it.

Three providers, one message. SPF, DKIM, DMARC, aligned. The floor is now the floor everywhere.

Email health check

Free Email Marketing Health Check

Audit your entire ecosystem in under 30 minutes

Answer a set of straightforward questions across every area of email marketing and get a personalised score, traffic-light priorities, and clear actions and improvements you can make today.

How to check yours, part one: read your own headers

The most useful check in email authentication costs nothing and takes two minutes. Send yourself an email from each of your sending platforms, and read the headers of what arrives.

Records in DNS tell you what you published. Headers tell you what receivers concluded. Only one of those is the truth.

 

Getting to the headers in Gmail

  1. Open the message in a browser, not the app.

  2. Next to Reply, click More, then Show original.

  3. The full header opens in a new window, with a Copy to clipboard button.

On mobile you get a cut-down view. Tap View details, then View security details, and look for Mailed by and Signed by. A question mark next to the sender name means the message was not authenticated. Google notes that unauthenticated mail is not necessarily spam, but it is not doing you any favours either.

In Outlook, open the message, then File, Properties, and read the Internet headers box. Most other clients have an equivalent, usually called view source or show original.

 

The one line that does most of the work

Scan for Authentication-Results. It will read something like this, wrapped across several lines in the raw header.

Authentication-Results: mx.google.com; dkim=pass header.d=yourdomain.co.uk; spf=pass smtp.mailfrom=bounce@mail.yourdomain.co.uk; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yourdomain.co.uk

Translating it:

  • dkim=pass the signature verified. The header.d or d= value tells you which domain signed. If that is your platform domain rather than yours, DKIM is passing but not aligning.

  • spf=pass and smtp.mailfrom tells you which envelope sender SPF checked. Compare it against the From address your reader sees.

  • dmarc=pass with header.from showing the domain your reader sees, and p= showing the policy the receiver found in your record.

 

The three domains to compare

Everything in DMARC comes down to holding three values next to each other.

  • smtp.mailfrom the envelope sender, which is what SPF checked.

  • d= in the DKIM-Signature header the domain that signed the message.

  • header.from the address your reader sees in their inbox.

If neither of the first two shares an organisational domain with the third, DMARC fails, no matter how many passes you can see. Learn to run that comparison and you can diagnose most authentication problems from a single email.

Two other header details worth knowing. dkim=pass can appear more than once, when your platform signs and your domain signs. And ARC-Authentication-Results records what an earlier hop saw, which matters for forwarded mail, because Google treats a forwarded message as unauthenticated if ARC shows it failed earlier in the chain.

 

Free header analysers, if raw text is not your thing

  • MXToolbox Email Header Analyzer. Paste the header, get a parsed view of every hop and the authentication results, with delays flagged.

  • Google Admin Toolbox Messageheader. Google own tool, good for delivery delays as well as authentication, and the one Google points you to from its own help pages.

 

How to check yours, part two: the free MXToolbox tools

MXToolbox SuperTool is free to use, available to all users, and the quickest way to inspect your records without logging into DNS. It combines MX, DNS, blacklist and SMTP diagnostics in one search box and keeps a history of what you ran.

 

The commands to type

Type a command, a colon, then your domain.

  • spf:yourdomain.co.uk your SPF record, parsed, with the lookup count.

  • dmarc:yourdomain.co.uk your DMARC record and its tags.

  • dkim:yourdomain.co.uk:selector your DKIM key for that selector.

  • blacklist:yourdomain.co.uk whether your domain or IP is listed anywhere.

  • mx:yourdomain.co.uk your mail exchangers, plus a general health check.

For the DKIM command you need the selector, which you will find in the s= tag of the DKIM-Signature header of any message you have sent. The header tells you the selector, the selector lets you check the record. Tidy loop.

 

What to look at in the SPF result

  • The lookup count. At or above ten and you have a problem, even if everything else looks fine.

  • Void lookups. Mechanisms pointing at records that no longer resolve, normally a platform you stopped using.

  • More than one SPF record. Two records means the check fails. Merge them.

  • How the record ends. ~all while you verify, -all when you are confident, +all never.

What to look at in the DMARC result

  • Whether a record exists at all at _dmarc.yourdomain.co.uk and not somewhere adjacent.

  • The p= value, and whether it is where you think it is.

  • Whether rua= is present and pointing at a mailbox somebody reads or a tool that parses it.

  • Whether sp= and np= are set for your subdomains.

Run it for every domain, not just the main one

Your root domain, every sending subdomain, every brand domain, every domain you bought for a campaign and still own, and every domain you do not send from. Domains you never use are the easiest to spoof, because nobody thinks to protect them. A parked domain with p=reject, no SPF senders and np=reject costs five minutes.

 

Why authentication can look perfect and still fail

Every one of these is something I have found on a live setup that somebody was sure was fine.

  • Forwarding. SPF breaks because the forwarding IP is not yours. DKIM usually survives, which is why DKIM alignment is what saves you.

  • Mailing lists. Rewriting the subject or appending a footer invalidates the DKIM body hash.

  • A shared Return-Path. The platform passes SPF on its own domain and aligns with nothing of yours.

  • Subdomains with no record of their own, which is what sp= and np= are for.

  • A 2048-bit DKIM key split incorrectly by a DNS provider, so the public key never parses.

  • An SPF record that crept over ten lookups the week somebody added one more tool.

  • A DMARC record published at the wrong hostname, on the root domain or on www instead of _dmarc.

  • A platform where the record was published but verify was never clicked.

  • A migration. New platform, new Return-Path, old DNS. Every migration needs an authentication pass, every single time.

 

What authentication buys you, and what it does not

Authentication proves identity. Not quality, not permission, not reputation.

A perfectly authenticated email to a list you bought is still a perfectly authenticated email to a list you bought. SPF, DKIM and DMARC get you considered. Engagement, complaint rate, list quality, sending patterns and what you put in the email decide where you land.

Most of the deliverability problems I am called into are sitting on top of a clean authentication setup. Which is why we have done DMARC so rarely fixes the thing people were hoping it would fix.

Authentication is the floor. Worth getting right, and not the same thing as getting delivered.

One upside though, getting to p=quarantine or p=reject unlocks BIMI, which is how you get your logo showing in the inbox. Enforcement is the entry requirement, so the work is not wasted.

 

Guiding principles, not a checklist

Email authentication is not a project you finish, it is a thing you keep correct.

  • Inventory before DNS. You cannot authenticate senders you have not found, and nobody has ever given me a complete list first time.

  • One SPF record, under ten lookups, reviewed every time somebody adds a tool.

  • DKIM on every platform, signed with your domain, 2048-bit when offered, and verified rather than merely published.

  • DMARC at p=none with reports first, read for weeks, then moved up deliberately.

  • Alignment is the test that matters. Compare the three domains, not the three ticks.

  • Protect the domains you do not send from, not only the ones you do.

  • Re-check after every platform change, contract change and migration.

  • Write new records for the current standard, without pct, with np, now that RFC 9989 is published.

Do those eight things and you will be ahead of the 29.2 per cent of domains sitting permanently at p=none, and well ahead of the half with no record at all.

astral academy (2)

Learn deliverability properly, not record by record

Authentication is one module of a much bigger picture. My Email Deliverability Certification covers authentication alongside reputation, engagement, infrastructure, list health, diagnostics and the way mailbox providers make their decisions, so you stop fixing symptoms one at a time.

 

You get the frameworks, the diagnostic process, and the bonus modules including re-engagement, all built from client work rather than vendor documentation.

 

Further reading from The Vault:



Sources and further reading

Everything above is checkable. Primary specifications first, then the published provider requirements, then the tools.

 

The specifications

Provider requirements

Tools and explainers

 

Like this blog? You'll love RE:markable

RE:markable is the weekly email about emails. Dropping the latest email marketing news, updates, insights, free resources, upcoming masterclasses, webinars, and of course, a little inbox mischief.

 

Email, CRM and HubSpot Support

I help marketers and businesses globally improve, design and fix their email, CRM, and HubSpot ecosystems, from strategy through to execution.

My services include:

  • Email marketing strategy, audits, training, workshops, and consultancy

  • CRM strategy and enablement

  • Full HubSpot implementations, optimisation and onboarding through my agency

If you’re looking for experienced external support (and lots of enjoyment along the way), this is where to start.