How to stop email spoofing of your domain with SPF, DKIM and DMARC
Anyone can put your domain in the From line of an email. The From address has been “trivially forged throughout the history of email” [1]. You stop it with a DMARC record in your DNS that asks receivers to refuse mail your domain did not send.
The short answer
Publish a DMARC record with p=reject once SPF or DKIM passes, aligned with your From domain, for all the mail you send. DMARC asks receivers to reject mail whose From domain has no matching SPF or DKIM pass behind it. SPF and DKIM on their own leave the visible From address unprotected [1].
How email spoofing works
Spoofing is using someone else’s domain in the From address of a message [1]. Two other checks look at other parts of a message:
- SPF checks the domain in the envelope sender, the hidden
MAIL FROMaddress [2] that bounces go to [5]. A forger can use their own domain there, pass SPF for it, and still show your domain in From. RFC 9989: “any Domain Owner, even a bad actor, can publish an SPF record for its domain and send an email that will obtain an SPF ‘pass’ result” [1]. - DKIM checks a signature made with the key of the domain named in the signature. “A message can bear a valid signature from any domain, even one used by a bad actor” [1].
DMARC ties both checks to the From address. A message passes DMARC only if SPF or DKIM passes for a domain in alignment with the From domain: the same domain, or by default any domain with the same organizational domain, such as bounce.example.com for example.com [1]. Your DMARC policy then says what you ask receivers to do with mail that fails [1].
- A forged message arrives
- SPF
- DKIM
- DMARC
- What the policy asks:
p=noneor no recordNo requestp=quarantineTreat as suspiciousp=rejectRefuse
The records that protect a domain
A domain that sends mail, protected:
example.com. TXT "v=spf1 include:_spf.google.com ~all"
_dmarc.example.com. TXT "v=DMARC1; p=reject; rua=mailto:dmarc-reports@example.com"
DKIM needs a third record, a public key at <selector>._domainkey.example.com [3]. Your mail provider generates the key and tells you the selector name and the exact record.
| Record | Where | What it proves | Alone, it misses |
|---|---|---|---|
| SPF | example.com (TXT) |
The sending server may use example.com as envelope sender [2]. |
The From address people see [1]. |
| DKIM | <selector>._domainkey.example.com (TXT) |
The domain named in the signature takes responsibility for the message, checked with a public key published in its DNS [3]. | The From address, if the signing domain is a different one [1]. |
| DMARC | _dmarc.example.com (TXT) |
Asks receivers to check that SPF or DKIM passed for the From domain, and says what to do if not [1]. | Lookalike domains and display names [1]. |
p=none, p=quarantine and p=reject
| Policy | What it asks receivers to do with mail that fails DMARC |
|---|---|
p= |
Nothing. “The Domain Owner offers no expression of preference” [1]. |
p= |
Treat it as suspicious. It does not reach the inbox at receivers that follow the policy [1]. |
p= |
Treat it as “a clear indication that the use of the domain name is not valid” [1]. |
Only quarantine and reject change what happens to forged mail [1]. RFC 9989 describes starting at p=none with a rua address, reading the aggregate reports and moving to enforcement once all of your own mail passes [1]. That can take many months [1].
RFC 9989, published in May 2026, removed the pct tag and added t. With t=y, receivers that follow RFC 9989 apply one level less than the policy you wrote [1].
What receivers do with forged mail
Receivers decide for themselves and can take your policy into account [1]. Gmail rejects forged mail from a domain whose DMARC policy asks for it [4]:
What DMARC cannot stop
DMARC protects your exact domain. It does not address “visually similar domain names”, such as a domain one letter off yours, or a trusted name in the display part of the From line [1].
Problems and fixes
A domain that sends no email is unprotected
A parked or website-only domain without SPF and DMARC records is open to any forger. Lock it down with four DNS records.
DMARC is stuck at p=none
Your DMARC record exists but says p=none, so forged mail still arrives. Move from p=none to p=reject without losing real mail.
You do not know which services send as your domain
You cannot move to p=reject until every real sender passes. The rua reports list them. Read DMARC aggregate reports.
Check if your domain can be spoofed
The checker reads your domain’s MX, SPF, DKIM and DMARC records in your browser, tells you whether anyone can send email as you and gives the records that fix it.
Runs in your browser. Your domain is not sent to this site or stored.
Guides in this topic
Lock down a domain that sends no email: null MX, SPF, DMARC and DKIM
A parked or website-only domain can still be forged in phishing mail. Protect a domain that doesn’t send email with four DNS records, ready to copy and paste.
