Zoes
← Blog

SPF, DKIM and DMARC, explained with real records

What each of the three checks proves, what the DNS records look like for Google Workspace and Microsoft 365, and how to roll out DMARC without breaking your own mail.
By · October 14, 2026 · 6 min read
Three plain envelopes on a white surface
Photo: Diana Light on Unsplash

Why this matters now

SPF, DKIM and DMARC used to be optional hygiene. Since February 2024, Google and Yahoo require all three from anyone sending more than 5,000 messages a day to their users, and expect at least SPF or DKIM from everyone else. Since May 2025 Microsoft applies similar rules to high-volume senders to Outlook.com, Hotmail and Live addresses. In practice, a business without them is more likely to land in spam - and is easier to impersonate.

What each one proves

Check
Proves
Weakness on its own
SPF
The sending server is on your published list of allowed senders
Checks a hidden envelope address, not the From a person sees
DKIM
The message was signed by a domain and not changed in transit
Nothing says what to do when a signature is missing
DMARC
The visible From domain matches a domain that passed SPF or DKIM, and tells receivers what to do if not
Only as strong as its policy; p=none just reports

Alignment, the key idea

An email carries two “from” addresses: the envelope sender used by mail servers, and the From header a person reads. SPF checks the first. An attacker can pass SPF for their own domain while showing your domain in the From line.

DMARC closes that gap by requiring alignment: the domain in the visible From must match the domain that passed SPF or the domain that signed with DKIM. Without alignment, a message can pass SPF and still be a forgery of your name.

Visible From
Passed check
DMARC result
DKIM signed by example.com
Pass - aligned
SPF passed for newsletter-tool.net only
Fail - not aligned
Nothing passed
Fail

The records

All three are TXT records in your domain's DNS. Publish only one SPF record per domain.

SPF for Google Workspace

example.com   TXT   "v=spf1 include:_spf.google.com ~all"

SPF for Microsoft 365

example.com   TXT   "v=spf1 include:spf.protection.outlook.com -all"

Add an include: for every other service that sends as your domain - newsletter tool, invoicing software, help desk. SPF allows at most 10 DNS lookups in total, including nested includes.

DKIM

Your mail provider generates the key. In Google Workspace it is in the Admin console under Apps → Google Workspace → Gmail → Authenticate email. In Microsoft 365 it is in the Defender portal under Email authentication settings. You publish the record it gives you, then turn signing on. Every third-party sender needs its own DKIM setup too.

DMARC

_dmarc.example.com   TXT   "v=DMARC1; p=none; rua=mailto:[email protected]"

p is the policy, rua is where aggregate reports go. Add sp= to set a policy for subdomains and pct= to apply a stricter policy to only part of your mail while testing.

Checking what you have

From any terminal:

nslookup -type=txt example.com
nslookup -type=txt _dmarc.example.com

Or open any email you sent to a Gmail account and choose “Show original”: the top of the page shows SPF, DKIM and DMARC as PASS or FAIL for that exact message.

Rolling out DMARC

  1. 1Publish p=none with a rua address. Nothing is blocked; receivers send daily reports of who is sending as your domain.
  2. 2Read the reports for two to four weeks. Every legitimate service in them gets added to SPF or set up with DKIM.
  3. 3Move to p=quarantine, optionally with pct=25 first. Failing mail goes to spam instead of the inbox.
  4. 4When nothing legitimate fails, move to p=reject. Exact spoofing of your domain is now refused by receivers that honour DMARC.

Aggregate reports are XML files. A free DMARC report reader turns them into a readable list of senders.

Reading a DMARC report

Aggregate reports arrive as XML from each large receiver, usually once a day. Turned into a table, a week of reports for a small company often looks like this:

Sending source
Messages
SPF
DKIM
What to do
Your mail provider
4,210
Pass
Pass
Nothing - this is your normal mail
Newsletter tool
1,380
Pass (its domain)
Fail
Set up DKIM for your domain in the tool
Invoicing software
96
Fail
Fail
Add its include to SPF and enable DKIM
Unknown servers abroad
312
Fail
Fail
Likely spoofing - this is what reject will block

The goal before moving to quarantine is simple: every row you recognise passes, and every row that fails is something you do not want sending as you.

Third-party senders

Most small companies send as their domain from more places than they realise: a newsletter platform, a CRM, an invoicing tool, a help desk, a website contact form, a calendar booking tool. Each one needs to be covered, and there are two ways:

  • DKIM for your domain. The tool gives you DNS records (often CNAMEs) to publish; it then signs as your domain. This is the more reliable option for DMARC, because DKIM survives forwarding and SPF does not.
  • An SPF include. Adds the tool's servers to your list. Simple, but each include costs lookups against the limit of 10.
  • A subdomain. Sending marketing from news.example.com keeps its reputation and records separate from your everyday mail.

Common mistakes

  • Two SPF records on the same domain. Receivers treat this as an error, so SPF fails for everything.
  • More than 10 DNS lookups. Each include of a large provider can use several; the record silently fails past the limit.
  • Forgetting a sender. The invoicing system or website contact form starts landing in spam after p=quarantine.
  • Jumping straight to p=reject before reading reports, and blocking your own legitimate mail.
  • Protecting the main domain but leaving unused domains open. Publish "v=spf1 -all" and a p=reject DMARC on domains that never send mail.

What they do not do

  • They stop exact impersonation of your domain. They do nothing about lookalikes like example-billing.com.
  • They do not filter phishing sent to you. That is the job of inbound filtering.
  • A message from a hijacked real account passes all three, because it really is from that domain.
Those three gaps are where most targeted fraud sits - see vendor email compromise and the how business email compromise works.

Questions

Does Google Workspace or Microsoft 365 set these up for me?

Partly. They sign with their own default domain, but SPF, DKIM for your domain, and DMARC are DNS records you add yourself.

Is ~all or -all better in SPF?

With DMARC in place the difference is small, because DMARC decides the outcome. Many admins use ~all while testing and -all once every sender is listed.

Will DMARC hurt deliverability?

Done in stages, it improves it. Problems come from moving to quarantine or reject before every legitimate sender is configured.

Keep reading

See what is reaching your inboxes

Connects to Google Workspace or Microsoft 365 in minutes. Try it free for 14 days.