SPF, DKIM and DMARC Explained in Plain English

What SPF, DKIM and DMARC do, how they work together, and the exact records a small business needs to stop spoofing and reach the inbox.

By the TempMailify Editorial TeamUpdated November 12, 20264 min read
Quick answerSPF lists who may send for your domain, DKIM signs your messages, and DMARC tells receivers what to do when both fail. Since 2024 Gmail and Yahoo require them for bulk senders.

Why these three records exist

Email was designed without any way to prove who sent a message. SPF, DKIM and DMARC add that proof using DNS, so receivers can tell your real mail from forgeries.

SPF

An SPF record is a TXT record such as v=spf1 include:_spf.google.com ~all. It lists the servers allowed to send mail for your domain. Keep it to one record and under 10 DNS lookups. Check yours with our SPF checker.

DKIM

DKIM adds a cryptographic signature to each message. Your email provider gives you a public key to publish at selector._domainkey.yourdomain.com. Use 2048-bit keys where your provider supports them. Test with our DKIM checker.

DMARC

DMARC ties SPF and DKIM to the visible From domain and sets a policy. Start with v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com, read the reports for a few weeks, then move to p=quarantine and finally p=reject. Check your record with our DMARC checker.

What Gmail and Yahoo require

Since February 2024, anyone sending more than about 5,000 messages a day to Gmail must have SPF, DKIM and a DMARC record, keep spam complaints low and offer one-click unsubscribe. Yahoo has similar rules. Even small senders benefit from having all three.

Example records

yourdomain.com TXT "v=spf1 include:_spf.google.com -all"
google._domainkey.yourdomain.com TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkq..."
_dmarc.yourdomain.com TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com"

The SPF record lists who may send. The DKIM record publishes the public key that receivers use to check signatures. The DMARC record sets the policy and asks for reports.

Alignment, the part most people miss

DMARC passes only when SPF or DKIM passes and the domain they checked matches the domain in the visible From address. SPF checks the hidden envelope sender (Return-Path), which is often the domain of your email service. DKIM checks the d= domain in the signature. If your newsletter tool signs with its own domain and sends with its own Return-Path, both checks can pass while DMARC still fails for your domain. The fix is to set up a custom sending domain in the tool so it signs as you.

A safe rollout plan

  1. Publish SPF with every service that sends for you, ending in ~all at first.
  2. Turn on DKIM signing in each service and publish their keys.
  3. Publish DMARC with p=none and a reporting address.
  4. Read the reports for two to four weeks and fix any legitimate sender that fails.
  5. Move to p=quarantine, then to p=reject when reports are clean.

Check your own domain now

Use our SPF checker, DKIM checker and DMARC checker to see your live records. Then send a test message to a temporary inbox: the Email X-ray shows whether each check passed on a real message.

Reading a DMARC aggregate report

DMARC reports are XML files sent daily by large receivers. Each record lists a sending IP, how many messages it sent, and whether SPF and DKIM passed and aligned. Look for three things: your own services passing (good), your own services failing (fix them before tightening the policy), and unknown IPs sending as your domain (spoofing, which a stricter policy will stop). Free and paid tools turn these XML files into readable dashboards.

Your checklist

  • Publish one SPF record.
  • Turn on DKIM for every sending service.
  • Start DMARC at p=none with reports.
  • Move to quarantine, then reject.

Terms used on this page

SPF
Sender Policy Framework, a DNS record listing which servers may send mail for a domain, helping receivers detect spoofing.
DKIM
DomainKeys Identified Mail, a cryptographic signature added to emails so receivers can verify they weren't altered and came from the domain.
DMARC
A policy that tells receivers what to do with mail failing SPF or DKIM checks, and where to send reports.
DNS
The Domain Name System, which translates domain names into the information computers need, like IP addresses and mail servers.
TXT record
A DNS record that holds free-form text, used for SPF, DKIM, DMARC and domain verification.
Spam
Unsolicited bulk email, usually commercial, sent without the recipient's consent.
Envelope sender
The sender address used by mail servers during delivery, which can differ from the From address you see.
Return-Path
The address that receives bounce messages, also called the envelope sender or MAIL FROM.

Free tools for this

  • SPF Checker: Validate SPF, spot multiple records and estimate DNS lookups.
  • DKIM Checker: Fetch a DKIM public key by domain and selector.
  • DMARC Checker: See any domain's DMARC policy and what it means.

Related guides

FAQ

Do I need DMARC if I only send a few emails?

Yes. Without it, anyone can send mail pretending to be your domain, and some providers treat unauthenticated mail with suspicion.

Can I have two SPF records?

No. Two SPF records cause a permanent error. Merge them into one.

What is the difference between ~all and -all?

~all (softfail) asks receivers to accept but mark mail from unlisted servers. -all (fail) asks them to reject it. With DMARC in place, receivers usually follow the DMARC policy instead.

Do I need all three?

Yes. Each covers a gap the others leave, and Gmail and Yahoo require them for bulk senders.

What breaks when I set p=reject?

Any legitimate service that is not authenticated. That is why you read reports first.

How long does setup take?

The records take minutes. Reaching p=reject safely usually takes a few weeks.

Try it free

A private disposable inbox with an Email X-ray for every message.

Get a temp email

Install TempMailify

Add TempMailify to your device for one-tap access, like a regular app.