SPF, DKIM and DMARC Explained: Stop Spoofing, Reach Inboxes
SPF DKIM DMARC explained in plain language for small businesses: what each record does, example values, a safe rollout plan and how to test your setup.
SPF, DKIM and DMARC are three DNS records that prove email claiming to come from your domain really did. SPF lists who may send for you, DKIM signs each message, and DMARC tells receivers what to do when a message fails and reports back to you. Together they make spoofing harder and give your real mail a better chance of reaching the inbox.
You do not need to be an engineer. You need access to your domain’s DNS settings and about an hour.
Why this matters
Email was designed without sender checks. Anyone can type your address into the From field. Receiving servers now look for evidence before trusting a message, and if your domain offers none, your real mail looks the same as a forgery.
For a small business, that shows up in two ways: customers receiving fake invoices that appear to come from you, and your own legitimate messages landing in spam. Authentication addresses both.
SPF: who may send
SPF (Sender Policy Framework) is a TXT record that lists the servers allowed to send mail for your domain. A receiver looks up the record and checks whether the sending server is on the list.
An example for a domain whose mail service tells you to include its servers:
v=spf1 include:mail.example.net ~all
Reading it from left to right:
v=spf1marks the record as SPF.include:adds another sender’s approved servers.~allmeans other servers should be treated with suspicion (a soft fail).-allmeans reject them.
Rules to remember: a domain may have only one SPF record, and SPF allows at most ten DNS lookups. Two separate SPF records break both.
DKIM: a signature on every message
DKIM (DomainKeys Identified Mail) adds a cryptographic signature to each outgoing message. Your mail service holds a private key and signs. You publish the matching public key in DNS, and receivers use it to verify that the message came from you and was not changed in transit.
Your service will give you a record name such as selector._domainkey.yourcompany.com and a value to paste. Copy it exactly. DKIM does not need maintenance after that, apart from occasional key rotation.
DMARC: the policy and the reports
DMARC ties the two together. It checks that SPF or DKIM passed and that the domain in the passing check matches the visible From address. It then applies your policy.
An example record published at _dmarc.yourcompany.com:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourcompany.com
p=nonemeans monitor only. Nothing is blocked.p=quarantinemeans failing mail goes to spam.p=rejectmeans failing mail is refused.rua=is where daily summary reports are sent.
A safe rollout plan
Do these in order. Do not skip the waiting.
- List every sender. Your mail service, plus anything else that sends as your domain: a billing tool, a newsletter service, a support desk, a website form.
- Publish SPF including all of them.
- Enable DKIM for each sender that supports it.
- Publish DMARC with p=none and a reports address.
- Wait two to four weeks and read the reports. Look for legitimate senders that fail, and fix them.
- Move to p=quarantine, ideally in stages, then watch for a couple of weeks.
- Move to p=reject once the reports are clean.
If you have just set up your first domain, this setup guide shows where these records fit in the process.
How to test
After publishing:
- Send a message from your domain to an outside mailbox.
- Open the full headers of the received message.
- Look for lines showing
spf=pass,dkim=passanddmarc=pass. - If any shows fail or none, check the record for typos, extra spaces or a duplicate.
Repeat for every system that sends as your domain, including the ones that only send occasionally.
Common mistakes
| Mistake | What happens | Fix |
|---|---|---|
| Two SPF records | Both are ignored | Merge them into one |
| Forgetting a sender | Its mail fails DMARC | Add it to SPF and enable DKIM |
| Jumping to reject | Legitimate mail is blocked | Start with p=none |
| Wrong DNS name | The record is never found | Check the exact host name your service gave you |
| Typo in the value | Checks fail | Copy and paste, do not retype |
Beyond the records
Authentication is the foundation, not the whole building. Good deliverability also depends on sending only to people who expect your mail, keeping bounce rates low, and writing messages that look like what they are. Admins who manage domains and mailboxes in one place find these tasks easier to keep up with.
Key takeaways
- SPF lists who may send, DKIM signs the message and DMARC sets the policy and sends reports.
- Publish SPF and DKIM first, then DMARC with p=none.
- Read the reports for a few weeks before tightening to quarantine and then reject.
- Test with real messages and look for pass results in the headers.
- These records prove identity but do not guarantee inbox placement.
Frequently asked questions
Do I need all three of SPF, DKIM and DMARC?
Yes, they work together. SPF and DKIM prove a message is genuine in two different ways, and DMARC tells receiving servers what to do when those checks fail and sends you reports.
Will these records guarantee my email reaches the inbox?
No. They prove who sent the message, which helps. Inbox placement also depends on content, sending volume, complaints and the reputation of your domain.
Can I break my email by adding DMARC?
Yes, if you jump straight to a strict policy while a legitimate sender is still unauthenticated. Start with a monitoring policy, read the reports, fix gaps, then tighten step by step.
How do I check whether my records are correct?
Send a test message to an outside address and read its headers for SPF, DKIM and DMARC results. You can also look up your domain's TXT records with a DNS lookup tool.