Guide

Is my email going to spam? SPF, DKIM, and DMARC explained

If your invoices, password resets, or newsletters land in spam, the cause is usually not your words — it is your DNS. Receiving mail servers check three records to decide whether a message really came from you. Here is what each one does, how to check yours in two minutes, and how to fix the failures in the right order.

The three records, in plain language

You need all three. SPF without DMARC is a guest list nobody enforces, and Gmail and Yahoo have required proper authentication for bulk senders since 2024 — missing records now mean spam folders or outright rejection, not a slap on the wrist.

Check your records in two minutes

On Mac or Linux, use dig. On Windows, swap in nslookup -type=TXT with the same names.

SPF — look for a TXT record starting with v=spf1:

dig +short TXT yourdomain.com
"v=spf1 include:_spf.google.com -all"

The ending matters: -all means "reject anything not on the list" (good), while ~all means "probably spam, but deliver anyway" — a softfail that many domains leave in place forever and spammers love. Also count theinclude: entries and any a, mx, orredirect terms: SPF allows at most 10 DNS lookups total, and going over makes the whole record fail with a permanent error.

DKIM — keys live under a "selector" name your mail provider chose:

dig +short TXT google._domainkey.yourdomain.com

Common selectors are google for Google Workspace andselector1 / selector2 for Microsoft 365; every other sender you use (your newsletter tool, your helpdesk, your invoicing app) has its own. A long v=DKIM1; k=rsa; p=... value means the key exists. No answer means that selector has no key published.

DMARC — one record, at a fixed name:

dig +short TXT _dmarc.yourdomain.com
"v=DMARC1; p=quarantine; rua=mailto:[email protected]"

No answer here is the single most common finding: the domain has no DMARC at all, so anyone can send mail pretending to be it and receivers get no instructions to stop them.

The failures that actually send you to spam

The fix order that works

  1. List every sender. Mailbox provider, website forms, newsletter tool, invoicing, helpdesk — anything that sends as your domain.
  2. SPF: include each sender, keep the total under 10 lookups, and end with -all.
  3. DKIM: enable signing at each sender and publish every selector's key in your DNS.
  4. DMARC: start at p=none with reports coming to you, read a week or two of reports to catch senders you missed, then step up to p=quarantine and finally p=reject.

Change one thing at a time and re-check after each step — DNS edits are small, but a typo in an SPF record can break mail for the whole domain.

The automated way

The PapaCasper MCP Toolbelt's email_deliverability_check tool runs this whole inspection in one call for $0.05: MX records and their reverse DNS, DKIM selector probing, the SPF lookup count against the 10-lookup limit, DMARC policy strength, and blacklist checks on your mail servers' IPs — returned as JSON an agent or script can act on, no signup or API key needed.

And if you'd rather not live in DNS records at all, this check is part of the done-for-you website audit I run — the details are onpapacasper.com.

Run the full email check

Connect any MCP client to https://papacasper.com/mcp and callemail_deliverability_check — or browse the full catalog of 29 tools first.

Browse the MCP Toolbelt