SPF, DKIM and DMARC: the three records that stop email spoofing

SPF, DKIM and DMARC are three DNS records that work together to prove an email genuinely came from your domain, so a scammer cannot send convincing fakes in your name. SPF lists which servers are allowed to send for you, DKIM adds a tamper-evident signature, and DMARC ties the two together and tells receiving servers what to do when a message fails.

Explainer5 min read

Each one closes a different gap, and they are weaker on their own than as a set. Used together they make it far harder for someone to spoof your domain in phishing emails to your customers, suppliers or staff.

This guide explains what SPF, DKIM and DMARC each do in plain English, shows how they reinforce one another, and covers where MTA-STS fits in to protect the email while it is in transit.

SPF: who is allowed to send

SPF (Sender Policy Framework) is a DNS record that lists the servers and services permitted to send email using your domain. When a receiving server gets a message claiming to be from you, it looks up your SPF record and checks whether the sending server is on that approved list.

SPF is the simplest of the three, but it only checks the sending server, not the message itself, and it can break when mail is forwarded.

  • Published as a TXT record in your DNS
  • Names your mail provider, marketing tools and any other approved senders
  • Checks the envelope sender against the approved servers
  • Does not verify the message body or the visible From address on its own

DKIM: a tamper-evident signature

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to every message you send. The receiving server fetches your public key from DNS and uses it to confirm two things: that the email really came from your domain, and that the signed parts were not altered along the way.

Because the signature travels with the message, DKIM survives forwarding better than SPF. It relies on a per-selector public key in DNS, which is why a standard external lookup cannot reliably find it.

DMARC: the policy that ties it together

DMARC (Domain-based Message Authentication, Reporting and Conformance) sits on top of SPF and DKIM. It tells receiving servers what to do with a message that fails the checks, and it asks them to send you reports on what is being sent in your name.

The policy is the part that matters. A record set to p=none only monitors and takes no action, so spoofed mail can still land. Moving to p=quarantine or p=reject is what actually starts blocking fakes. DMARC also requires alignment: the domain that passed SPF or DKIM must match the visible From address.

  • p=none: monitoring only, no protection against spoofing yet
  • p=quarantine: failing mail is sent to spam or held
  • p=reject: failing mail is refused outright
  • Reports show who is sending as your domain before you tighten the policy

How SPF, DKIM and DMARC work together

Think of it as a chain. SPF and DKIM each give a message a way to prove it is legitimate. DMARC then says the message must pass at least one of those checks, the result must align with the From address, and here is what to do if it does not.

A common mistake is publishing all three but leaving DMARC at p=none, which looks protected but is not. The usual order is to set up SPF and DKIM, add DMARC at p=none to gather reports, confirm your genuine mail is passing, then raise the policy to quarantine and finally reject.

Free, instant, no account

See your site's security grade in seconds.

Free, instant, and no account needed to see your grade.

Scan my site free

Plain-English A to E grade in about 10 seconds. No account needed to see it.

Where MTA-STS fits in

SPF, DKIM and DMARC are all about proving who sent a message. MTA-STS (SMTP MTA Strict Transport Security) is about protecting the message in transit: it tells other mail servers they must use a valid, encrypted TLS connection when delivering email to your domain. That reduces the risk of an attacker intercepting or quietly downgrading the connection.

It is a useful complement to the authentication trio rather than a replacement. Together they answer two questions: who sent the email, and did it travel securely.

What the free EB Security scan checks

Our free external scan reads your public DNS and reports on your SPF record, your DMARC record (including whether the policy is enforced or still p=none), and whether MTA-STS is present. It is a quick way to see whether the basics are in place and where the obvious gaps are.

One honest limit is worth knowing. DKIM uses a per-selector key that a standard external lookup cannot reliably detect, so the scan does not flag it. A clean SPF, DMARC and MTA-STS result is a good first signal, but confirm DKIM directly with your mail provider to finish the job.

SPF says who can send, DKIM signs the message, and DMARC enforces both and reports back. Add MTA-STS to protect mail in transit, and remember a DMARC policy of p=none monitors but does not yet block spoofing.

Common questions

What is SPF, DKIM and DMARC in simple terms?
They are three DNS records that together prove an email really came from your domain. SPF lists who is allowed to send, DKIM adds a tamper-evident signature, and DMARC ties them together and decides what happens when a message fails the checks.
Do I need all three of SPF, DKIM and DMARC?
Ideally, yes. SPF and DKIM each prove legitimacy in a different way, and DMARC ties them together and decides what happens when a message fails. With only one or two in place, gaps remain that spoofers can use.
What is the difference between SPF and DKIM?
SPF checks whether the sending server is on your approved list, while DKIM adds a cryptographic signature that proves the message came from you and was not altered. DKIM also survives email forwarding better than SPF.
Why is my DMARC policy of p=none not protecting me?
p=none only monitors and reports; it does not tell receiving servers to block or quarantine failing mail. Once your genuine email is passing reliably, raise the policy to p=quarantine and then p=reject to actually stop spoofed messages.
Does the EB Security scan check DKIM?
No. DKIM uses a per-selector public key that a standard external lookup cannot reliably detect, so we do not flag it. We do check SPF, DMARC and MTA-STS via DNS; confirm DKIM directly with your email provider.
What does MTA-STS do that DMARC does not?
DMARC, SPF and DKIM prove who sent a message. MTA-STS protects the message in transit by requiring a valid, encrypted TLS connection for delivery to your domain. They solve different problems and work well together.

How safe is your website?

A free A to E grade in about 10 seconds. No account needed.

Check my site