Stop email spoofing: a plain-English SPF and DMARC guide
To set up SPF and DMARC, you publish two small text records in your domain's DNS: an SPF record that lists who is allowed to send email as you, and a DMARC record that tells receiving servers what to do with mail that fails. The safe order is to publish SPF first, add DMARC at p=none with a reporting address, watch the reports for a week or two, then tighten the policy to quarantine or reject once you are confident.
Spoofing is when someone forges your domain in the From line so their email looks like it came from you. Knowing how to set up SPF and DMARC makes that much harder, which protects your customers and your sender reputation.
This guide walks through it in order, with no jargon. Once you have published your records, our free scanner reads your public DNS and confirms whether SPF, DMARC and MTA-STS are in place.
Step 1: Publish an SPF record
SPF (Sender Policy Framework) is a single DNS TXT record at the root of your domain that lists every service allowed to send email for you. Receiving servers read it to decide whether a message really came from an authorised source.
First, write down everything that sends mail as your domain: your main mailbox provider (for example Microsoft 365 or Google Workspace), plus any newsletter, CRM, invoicing or website contact-form tools. Each of those documents the SPF entry it needs.
- A basic record looks like: v=spf1 include:_spf.google.com ~all
- include: pulls in a provider's allowed servers; add one include per sending service
- End with ~all (soft fail) while testing, then -all (hard fail) once the list is complete
- Keep one SPF record per domain, and stay within the 10 DNS-lookup limit or it breaks
Step 2: Add a DMARC record at p=none
DMARC ties SPF (and DKIM) to the visible From address and tells receivers what to do when a message fails. It can also send you reports. Always begin in monitoring mode so you do not accidentally block your own legitimate email.
Create a TXT record at _dmarc.yourdomain.co.uk. A monitoring starter looks like: v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.co.uk. The p=none means take no action yet, while rua is the address that receives the aggregate reports.
Step 3: Read the reports, then enforce
The aggregate (rua) reports are XML files showing which sources sent mail as your domain and whether they passed SPF and DKIM. They are fiddly to read raw, so most people feed them into a free DMARC report viewer. Give it a week or two until you recognise every legitimate sender and have fixed any that fail.
Once the picture is clean, raise the policy in stages. Move from p=none to p=quarantine (failing mail goes to spam), watch again, then to p=reject (failing mail is refused outright). The pct tag lets you roll out enforcement gradually.
- p=none: monitor only, nothing is blocked
- p=quarantine: failures are treated as spam
- p=reject: failures are refused, the strongest protection against spoofing
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 freePlain-English A to E grade in about 10 seconds. No account needed to see it.
Don't forget DKIM and MTA-STS
DKIM (DomainKeys Identified Mail) adds a cryptographic signature to your outgoing mail. You enable it in your mail provider's admin panel, which gives you a public key to publish as a DNS record on a named selector. DMARC works best when both SPF and DKIM are aligned, so turn DKIM on while you are at it.
MTA-STS is a newer record that tells other servers to insist on a valid, encrypted connection when delivering to you, which helps prevent interception. It is published via DNS plus a small policy file hosted on your domain.
How the free EB scanner checks this
Our scanner reads your public DNS to confirm three things: that an SPF record exists, that a DMARC record exists and whether its policy is actually enforced or still sitting at p=none, and whether MTA-STS is published. Each comes back as a plain-English finding with a fix, so you can see at a glance what is missing.
Be aware of the limits. The check is external and read-only: it does not log in, send test emails, or grade the quality of your SPF includes. It also does not auto-check DKIM, because DKIM lives on a per-selector name the scanner cannot reliably guess. Treat the result as a fast first signal, then verify DKIM in your mail provider's dashboard.
Publish SPF, add DMARC at p=none with a reporting address, read the reports, then move to quarantine or reject. Add DKIM and MTA-STS for full coverage.