In plain English
SPF vs DKIM vs DMARC: What Is the Difference?
The Simple Answer
SPF lists the servers allowed to send mail for a domain. DKIM adds a signature that proves the message was not changed and came from a domain that holds the key. DMARC checks that one of them matches the From address people see, and tells receivers what to do if neither does.
What does each one do?
All three are stored as DNS records. DNS is the public directory that turns a domain name into settings and addresses. A receiving mail server reads these records when a message arrives.
Think of SPF as a guest list at the door. DKIM is a wax seal on the envelope. DMARC is the rule that says the name on the invitation must match the guest list or the seal, and what to do with anyone who does not match.
| Item | Question it answers | DNS record type | What it checks |
|---|---|---|---|
| SPF | Is this server allowed to send? | TXT | The sending server against your list |
| DKIM | Is this message signed and unchanged? | TXT (or CNAME) | A signature in the message header |
| DMARC | Does a pass match the From domain? | TXT | Alignment, then your policy |
| MX | Where does incoming mail go? | MX | Not authentication, only delivery |
How do the three work together?
SPF and DKIM each give a pass or fail. On their own they can pass for a different domain than the one in the From line. A sending service might sign mail with its own domain, for instance.
DMARC closes that gap. It needs an SPF pass or a DKIM pass that aligns with the From domain. Only one aligned pass is required, not both. Its policy has three settings: none (only report), quarantine (treat as suspicious) and reject (refuse).
Example: a passing result that does not align
Assume a shop sends from shop.example, using a newsletter service.
The service signs mail with its own domain, so DKIM passes for the service.
The From line shows shop.example, so that DKIM pass does not align.
SPF also passes for the service's domain, so it does not align either.
DMARC fails until the shop sets up the service's custom domain signing.
Example: one aligned pass is enough
Assume staff mail is sent from the shop's own mail provider.
SPF passes and aligns with shop.example.
DKIM is missing, so it gives no result.
DMARC still passes, because one aligned result is enough.
What mistakes should I avoid when setting up SPF, DKIM and DMARC?
- Publishing two SPF records. A domain should have only one SPF record.
- Adding too many lookups to SPF. The standard allows 10 DNS lookups, and going over makes SPF fail.
- Forgetting a sender such as a billing system, form tool or newsletter service.
- Jumping straight to a reject policy before checking real results.
- Assuming that a published record proves every message uses it.
- Deleting old DKIM records while a service still signs with them.
What changes the answer when setting up SPF, DKIM and DMARC?
Forwarded mail can break SPF, because the forwarding server is not on your list. DKIM usually survives forwarding if the message is not altered. This is one reason DMARC accepts either result.
Each service you use may need its own setup, and its instructions come first. Receivers may also have their own rules, so check each provider's current requirements. A DMARC record can ask for reports, which show who is sending mail in your domain's name.
Google's sender guidelines FAQ says a bulk sender is one that sends close to 5,000 or more messages to personal Gmail accounts in 24 hours. For those senders it requires SPF and DKIM, a DMARC record with at least a policy of none, and one-click unsubscribe on marketing mail.
The SPF standard (RFC 7208) lets a domain say which hosts may send for it, and limits the number of lookups an SPF record may cause to 10. The DMARC document (RFC 7489) describes policies that range from no action, through altered delivery, to rejection; its page notes that newer documents have since replaced it.
A pass does not promise the inbox. Receivers also weigh complaints, content and sending habits. Authentication shows who you are, and it helps, but it is only one signal among several.
A quick checklist for setting up SPF, DKIM and DMARC
- List every service that sends mail as your domain.
- Publish one SPF record that includes each of them.
- Turn on DKIM signing for each service and publish its record.
- Publish a DMARC record with the policy none and a reporting address.
- Read the reports and fix senders that fail.
- Move to quarantine, then reject, only when real mail passes.
DNS and Email Checker: Enter your domain and see its SPF, DKIM and DMARC records read back in plain words.