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"
  1. Keep it to one record; two SPF records is an error.
  2. 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

  1. After a couple of weeks, check the reports for legitimate senders that fail. Fix their SPF or DKIM first.
  2. Move to p=quarantine (failing mail goes to spam), then to p=reject when you are confident nothing legitimate fails.
  3. 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.

ToolCategoryFree?Pricing modelOpen sourceLink
dmarcianHosted DMARC report processing with deployment guidance and a free personal plan.SPF, DKIM & DMARCFree planFree personal plan; paid subscriptionsNot statedOfficial site ↗
EasyDMARCHosted DMARC monitoring with SPF/DKIM tools, record generators and managed SPF.SPF, DKIM & DMARCTrial onlyFree trial; monthly or annual subscriptionsNot statedOfficial site ↗
Google Admin Toolbox DigGoogle's browser-based dig tool for querying DNS records, part of the Google Admin Toolbox.DNS lookup & propagationFree planFreeNot statedOfficial site ↗
Mail-TesterSend a message to a one-time address and get a spam-score report covering authentication, content and blocklists.Deliverability testingFree planFree tests; paid test packs and monthly test subscriptionsNot statedOfficial site ↗
MxToolboxFree lookups for MX, SPF, DKIM, DMARC and blocklists, with paid monitoring and delivery tools.SPF, DKIM & DMARCFree planFree lookups and free account; paid monitoring subscriptionsNot statedOfficial site ↗
parsedmarcOpen-source Python tool that parses DMARC aggregate and forensic reports into Elasticsearch/OpenSearch or Splunk dashboards.SPF, DKIM & DMARCFree planFree, self-hostedOpen sourceOfficial site ↗
Postmark DMARC DigestsFree weekly DMARC digest emails from Postmark, with a paid monitoring tier for more detail.SPF, DKIM & DMARCFree planFree weekly digests; paid per-domain monthly plan (14-day trial)Not statedOfficial site ↗

Related guides

This guide is general information, not professional advice. Check your providers' own documentation for the exact records to add.