Guide

SPF, DKIM and DMARC explained

The three DNS records that decide whether mailbox providers trust your email, what each one does, and how to set them up without breaking anything.

THE SHORT VERSION

  1. SPF lists which servers may send email for your domain. Publish exactly one record and stay under 10 DNS lookups.
  2. DKIM signs each message with a private key; receivers verify it with the public key in your DNS.
  3. DMARC tells receivers what to do when SPF and DKIM fail to align with your From domain, and where to send reports.
  4. Roll DMARC out gradually: start at p=none, read the reports, then move to quarantine and reject.
  5. All three are expected by Google, Yahoo and Microsoft for anyone sending in volume.

Why email authentication exists

Email was designed without any way to prove who sent a message. Anyone can put any address in the From line. SPF, DKIM and DMARC were added on top, using DNS records that only the domain owner can publish, so receiving servers can check whether a message really comes from the domain it claims.

For cold email this matters twice over: authenticated mail is far more likely to reach the inbox, and authentication stops others from spoofing your domain.

SPF: who is allowed to send

SPF (Sender Policy Framework) is a TXT record on your domain listing the servers and services allowed to send mail for it. When a message arrives, the receiver checks the sending server against that list.

v=spf1 include:_spf.google.com include:sendgrid.net ~all
  • v=spf1 marks the record as SPF.
  • include: authorises another provider's servers. Add one for every service that sends as your domain.
  • ~all (soft fail) or -all (hard fail) says what to do with everything else. Avoid +all, which authorises the whole internet.

Two rules that break SPF most often

  • One record only. Two SPF records on the same domain make SPF fail. Merge them into one.
  • Maximum 10 DNS lookups. Each include, a, mx and redirect counts, including lookups nested inside included records. Past 10, SPF returns a permanent error.

DKIM: proof the message wasn't altered

DKIM (DomainKeys Identified Mail) adds a digital signature to the header of every message. Your email provider signs with a private key, and you publish the matching public key in DNS under a selector, for example google._domainkey.yourdomain.com.

google._domainkey  TXT  "v=DKIM1; k=rsa; p=MIIBIjANBgkqh..."
  • Use 2048-bit keys where your provider supports them.
  • Each sending service has its own selector and key, so several DKIM records can coexist.
  • A record with an empty p= means the key has been revoked.

Unlike SPF, DKIM survives forwarding, which is why DMARC can rely on either one passing.

DMARC: the policy that ties it together

DMARC (Domain-based Message Authentication, Reporting and Conformance) checks that SPF or DKIM not only pass, but pass for a domain that aligns with the visible From address. It then tells receivers what to do with mail that fails, and asks them to send you reports.

_dmarc  TXT  "v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com; adkim=r; aspf=r"
  • p= is the policy: none (monitor only), quarantine (send to spam) or reject (block).
  • rua= is where aggregate reports are sent, showing who is sending as your domain.
  • adkim and aspf set alignment to relaxed (r, subdomains allowed) or strict (s, exact match).
  • pct= applies the policy to a percentage of failing mail, useful during rollout.

Build a valid record in seconds with the free DMARC record generator.

How the three work together

  1. A message arrives claiming to be from you@yourdomain.com.
  2. The receiver checks SPF: is the sending server authorised?
  3. It checks DKIM: is the signature valid for a domain's published key?
  4. DMARC checks that at least one of them passed and aligns with yourdomain.com.
  5. If alignment fails, the receiver applies your DMARC policy and records the result in your reports.

A safe DMARC rollout

  1. Publish SPF and DKIM for every service that sends as your domain.
  2. Publish DMARC at p=none with an rua address.
  3. Read the reports for a few weeks and fix any legitimate senders that fail.
  4. Move to p=quarantine, optionally starting with a lower pct.
  5. Move to p=reject once reports show only legitimate mail passing.

Common mistakes

  • Two SPF records on one domain.
  • Too many include statements, pushing SPF past 10 lookups.
  • DKIM enabled at the email provider but the public key never published in DNS.
  • DMARC left at p=none indefinitely with no one reading the reports.
  • Adding a new sending tool without updating SPF or setting up its DKIM.

Check your domain now with the free deliverability checker.

SPF, DKIM and DMARC side by side

RecordSPFDKIMDMARC
What it provesThe sending server is authorised for the domainThe message was signed by the domain and not alteredSPF or DKIM passed for a domain aligned with the From address
Where it livesTXT record on the domainTXT record at selector._domainkeyTXT record at _dmarc
Examplev=spf1 include:_spf.google.com ~allv=DKIM1; k=rsa; p=MIIB…v=DMARC1; p=none; rua=mailto:…
Survives forwardingUsually notYes, if the message isn't modifiedPasses if either aligned check passes
Most common failureTwo records, or more than 10 lookupsKey enabled but never published in DNSLeft at p=none with no one reading reports
StandardRFC 7208RFC 6376RFC 7489

Sources

Reviewed by Jawad Khan, founder of Arceus Digital. Last updated 26 November 2026.

FAQ

Common questions

Yes. Google, Yahoo and Microsoft expect anyone sending in volume to authenticate with SPF and DKIM and publish a DMARC policy aligned with the From domain. Without them, cold email is much more likely to be filtered.

No. A domain must have exactly one SPF record. If you use several sending services, combine them into one record with multiple include statements.

Start with p=none and a reporting address, review the reports, then move to p=quarantine and finally p=reject once all legitimate mail passes.

A selector is the name under which a DKIM public key is published, such as google._domainkey. It lets one domain have different keys for different sending services.

Get Started

Want this done for you?

Arceus Digital builds and manages cold email infrastructure that averages 90–95%+ inbox placement.