THE SHORT VERSION
- SPF lists which servers may send email for your domain. Publish exactly one record and stay under 10 DNS lookups.
- DKIM signs each message with a private key; receivers verify it with the public key in your DNS.
- DMARC tells receivers what to do when SPF and DKIM fail to align with your From domain, and where to send reports.
- Roll DMARC out gradually: start at p=none, read the reports, then move to quarantine and reject.
- 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=spf1marks 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,mxandredirectcounts, 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) orreject(block).rua=is where aggregate reports are sent, showing who is sending as your domain.adkimandaspfset 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
- A message arrives claiming to be from
you@yourdomain.com. - The receiver checks SPF: is the sending server authorised?
- It checks DKIM: is the signature valid for a domain's published key?
- DMARC checks that at least one of them passed and aligns with
yourdomain.com. - If alignment fails, the receiver applies your DMARC policy and records the result in your reports.
A safe DMARC rollout
- Publish SPF and DKIM for every service that sends as your domain.
- Publish DMARC at
p=nonewith anruaaddress. - Read the reports for a few weeks and fix any legitimate senders that fail.
- Move to
p=quarantine, optionally starting with a lowerpct. - Move to
p=rejectonce reports show only legitimate mail passing.
Common mistakes
- Two SPF records on one domain.
- Too many
includestatements, pushing SPF past 10 lookups. - DKIM enabled at the email provider but the public key never published in DNS.
- DMARC left at
p=noneindefinitely 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
| Record | SPF | DKIM | DMARC |
|---|---|---|---|
| What it proves | The sending server is authorised for the domain | The message was signed by the domain and not altered | SPF or DKIM passed for a domain aligned with the From address |
| Where it lives | TXT record on the domain | TXT record at selector._domainkey | TXT record at _dmarc |
| Example | v=spf1 include:_spf.google.com ~all | v=DKIM1; k=rsa; p=MIIB… | v=DMARC1; p=none; rua=mailto:… |
| Survives forwarding | Usually not | Yes, if the message isn't modified | Passes if either aligned check passes |
| Most common failure | Two records, or more than 10 lookups | Key enabled but never published in DNS | Left at p=none with no one reading reports |
| Standard | RFC 7208 | RFC 6376 | RFC 7489 |
Sources
- RFC 7208: Sender Policy Framework (SPF)
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
- RFC 7489: DMARC
- Set up SPF (Google Workspace Help)
- Set up DKIM (Google Workspace Help)
- Set up DMARC (Google Workspace Help)
- Email sender guidelines (Gmail Help)
Reviewed by Jawad Khan, founder of Arceus Digital. Last updated 26 November 2026.