How to set up SPF, DKIM and DMARC
Three DNS records tell receiving mail servers that a message using your domain really came from you. Set them up in this order and check each one before moving on.
What each record does
- SPF (a TXT record at your domain) lists the servers allowed to send mail for it.
- DKIM (a TXT or CNAME record under selector._domainkey) publishes a public key; your sending service signs each message with the matching private key.
- DMARC (a TXT record at _dmarc.yourdomain) tells receivers what to do when SPF or DKIM fails to line up with the From address, and where to send reports.
Step 1: list everything that sends as your domain
Write down every service that sends mail with your address in the From line: your mailbox host, your newsletter tool, your shop or app's transactional email service, your help desk. Each one will give you its own SPF include and DKIM record in its setup docs.
Step 2: publish one SPF record
A domain should have exactly one SPF record. Combine every sender into it, and end with ~all (soft fail) while you are testing.
yourdomain.com. TXT "v=spf1 include:_spf.example-host.com include:mail.example-sender.com ~all"- Keep it to one record; two SPF records is an error.
- SPF allows at most 10 DNS lookups. Every include: counts, so remove services you no longer use.
Step 3: turn on DKIM for each sender
In each sending service, open its domain or authentication settings. It will show one or more records (often CNAMEs) to add at your DNS host. Add them exactly as shown, then press the service's verify button.
Step 4: start DMARC in monitor mode
p=none changes nothing about delivery; it only asks receivers to send daily aggregate reports to the rua address. The reports are XML files, which is why most people send them to a DMARC report service (see the table below) instead of reading them by hand.
_dmarc.yourdomain.com. TXT "v=DMARC1; p=none; rua=mailto:reports@yourdomain.com"Step 5: read reports, then tighten
- After a couple of weeks, check the reports for legitimate senders that fail. Fix their SPF or DKIM first.
- Move to p=quarantine (failing mail goes to spam), then to p=reject when you are confident nothing legitimate fails.
- Change SPF from ~all to -all only after DMARC shows clean results.
Check your work
Use a lookup tool to confirm each record is published and parses, and send a test message to a spam-score checker. The tools below were all checked on their own pages on the date shown in each row.
Tools that check or monitor SPF, DKIM and DMARC
Alphabetical. Checked 2026-11-29 against each vendor's own pages. Open a tool for its sources.
| Tool | Category | Free? | Pricing model | Open source | Link |
|---|---|---|---|---|---|
| dmarcianHosted DMARC report processing with deployment guidance and a free personal plan. | SPF, DKIM & DMARC | Free plan | Free personal plan; paid subscriptions | Not stated | Official site ↗ |
| EasyDMARCHosted DMARC monitoring with SPF/DKIM tools, record generators and managed SPF. | SPF, DKIM & DMARC | Trial only | Free trial; monthly or annual subscriptions | Not stated | Official site ↗ |
| Google Admin Toolbox DigGoogle's browser-based dig tool for querying DNS records, part of the Google Admin Toolbox. | DNS lookup & propagation | Free plan | Free | Not stated | Official site ↗ |
| Mail-TesterSend a message to a one-time address and get a spam-score report covering authentication, content and blocklists. | Deliverability testing | Free plan | Free tests; paid test packs and monthly test subscriptions | Not stated | Official site ↗ |
| MxToolboxFree lookups for MX, SPF, DKIM, DMARC and blocklists, with paid monitoring and delivery tools. | SPF, DKIM & DMARC | Free plan | Free lookups and free account; paid monitoring subscriptions | Not stated | Official site ↗ |
| parsedmarcOpen-source Python tool that parses DMARC aggregate and forensic reports into Elasticsearch/OpenSearch or Splunk dashboards. | SPF, DKIM & DMARC | Free plan | Free, self-hosted | Open source | Official site ↗ |
| Postmark DMARC DigestsFree weekly DMARC digest emails from Postmark, with a paid monitoring tier for more detail. | SPF, DKIM & DMARC | Free plan | Free weekly digests; paid per-domain monthly plan (14-day trial) | Not stated | Official site ↗ |
Related guides
This guide is general information, not professional advice. Check your providers' own documentation for the exact records to add.