How to check SPF, DKIM and DMARC for a domain
Updated October 26, 2026 · 8 min read
When a client says their emails keep going to spam, the site is usually fine. The cause is almost always three DNS records that tell receiving mail servers a message is genuine: SPF, DKIM and DMARC. Since 2024, large mailbox providers have made them a requirement for anyone who sends in volume.
What each one does
- SPF lists the servers allowed to send email for the domain.
- DKIM adds a signature to each message that proves it wasn't changed and really came from the domain.
- DMARC tells receiving servers what to do with a message that fails SPF and DKIM (nothing, put in spam, or reject it), and where to send reports.
1. Check SPF
SPF is a TXT record on the bare domain that starts with v=spf1. Look it up:
dig +short TXT example.comA typical record looks like this:
v=spf1 include:_spf.google.com include:amazonses.com ~allWhat to check:
- There is exactly one. A domain with two SPF records breaks SPF. Merge them into one record.
- Every service that sends email for the domain is listed. That means the mailbox provider (Google uses
include:_spf.google.com, Microsoft 365 usesinclude:spf.protection.outlook.com), plus anything that sends invoices, newsletters or website forms. - It ends in `~all` or `-all`.
~allmarks other senders as suspicious, and-allrejects them. A record ending+alllets anyone send as the domain, and one with no ending doesn't say what to do. - It stays under 10 lookups. Each
include:costs at least one, and more than 10 makes SPF fail. Remove services you no longer use.
2. Check DKIM
DKIM keys live at a name that includes a selector your mail service chooses, so you can't list them. You have to know the selector, which the service's setup page shows. For a selector called google:
dig +short TXT google._domainkey.example.comYou should get a long value starting v=DKIM1 with a key after p=. An empty p= means the key was withdrawn. Each service that sends email for the domain needs its own DKIM record, and the setup page of each one gives the exact name and value to add.
3. Check DMARC
DMARC is a TXT record at _dmarc under the domain:
dig +short TXT _dmarc.example.comA good starting record:
v=DMARC1; p=none; rua=mailto:dmarc@example.comp=noneonly watches. It sends reports and changes nothing. It's the right place to start.p=quarantinesends failing messages to spam, andp=rejectrefuses them. Move to one of these once the reports show your real mail passes.rua=is where daily summary reports go. They're XML and hard to read by hand, but a free DMARC report service turns them into something useful.
4. Send a test message
Send an email from the domain to a Gmail address, open it, choose Show original, and look for SPF: PASS, DKIM: PASS and DMARC: PASS at the top. If any say FAIL or NEUTRAL, that record is the one to fix.
Common mistakes
- Adding a second SPF record instead of editing the first.
- Setting up the website's mail form but forgetting it sends from a different service than the mailbox.
- Adding DKIM for the mailbox provider but not for the newsletter or invoice tool.
- A DNS provider that adds the domain name again to the end of a record. If you enter
_dmarc.example.comand it becomes_dmarc.example.com.example.com, enter only_dmarc.
Keep watching it
These records break when someone changes email provider, adds a new service or moves DNS, and nobody checks afterwards. Site Monitors runs a daily health scan on each site that flags a missing or weak SPF or DMARC record, looks for DKIM, checks security headers, and emails you when something new appears.