SPF, DKIM and DMARC records

Read, check and build SPF, DKIM and DMARC records from their text: explains every tag, counts the DNS lookups of an SPF record against the limit of

loading SPF, DKIM and DMARC records
About this tool

What are SPF, DKIM and DMARC records?

Anyone can write your domain in the "From" line of an email. Three DNS records let receiving servers check whether a message really came from you. SPF lists the servers allowed to send for your domain. DKIM publishes a public key so receivers can verify the digital signature your mail server adds to each message. DMARC tells receivers what to do when SPF and DKIM do not line up with the visible "From" domain (nothing, quarantine or reject) and where to send reports.

This tool reads these records from their text, explains every tag in plain words and points out what is wrong. For SPF it counts the DNS lookups written in the record (include, a, mx, ptr, exists and redirect) against the limit of 10 in RFC 7208, because a record that goes over it makes SPF fail with a permanent error. For DKIM it reads the size of the public key and tells you if it is revoked, too short or not a valid key. For DMARC it checks the policy, percentage, alignment and report addresses. A builder next to each record creates a new one, and for DKIM it can generate an RSA key pair in your browser.

It never asks DNS anything. It does not know what is published for your domain and cannot follow an include to count the lookups inside it; it works from the text you paste. Everything stays in your browser, and a private key you generate leaves the page only if you copy it.

How to check or build a record

  1. Choose SPF, DKIM or DMARC. The page opens with an example record already analyzed.
  2. Paste your record. Values copied from a DNS panel with quotes or split strings are joined for you.
  3. Read the verdict and the list: errors break the record, warnings are risks, notes explain choices.
  4. To build one, use the form under the analysis: pick your senders for SPF, generate a key for DKIM, or choose a policy for DMARC.
  5. Copy the result and publish it as a TXT record at the host name shown above the editor. Compare it with the old record using the text diff. The DKIM key is plain base64: the Base64 tool can decode it.

Examples

An SPF record over the limit

v=spf1 followed by eleven include: terms counts 11 lookups, above the limit of 10. Receivers return a permanent error, so SPF fails for every message. Replace includes with ip4: ranges or remove senders you no longer use.

A DMARC record that only monitors

v=DMARC1; p=none; rua=mailto:dmarc@example.com collects reports without blocking anything. When the reports show that all your mail passes, move to p=quarantine and then p=reject, raising pct step by step.

A DKIM key that is too short

A 1024-bit key still works but is below the 2048 bits recommended today. Generate a 2048-bit pair, publish the new public key under a new selector and switch your mail server to it.

Common mistakes

  • Publishing two SPF records. A domain must have exactly one; merge them into a single v=spf1 record.
  • Ending SPF with +all or ?all. +all allows anyone to send as you and ?all protects nothing. Use -all or ~all.
  • Forgetting that includes count. Each include adds the lookups of its own record to the 10 allowed.
  • A DKIM key split in the wrong place. Long keys are published as several quoted strings in one TXT record, not as several records.
  • Jumping straight to p=reject. Read the reports first, or legitimate mail from a forgotten sender is lost.
  • Sending reports to another domain without permission. The other domain must publish a _report._dmarc record that allows it.

Frequently asked questions

Does this tool look up my domain's DNS?

No. It works only from the text you paste, so it cannot tell what is currently published or count lookups inside included records.

Where do I publish each record?

SPF at the domain itself, DKIM at selector._domainkey.domain, DMARC at _dmarc.domain, all as TXT records. The host name is shown above the editor.

Is the private key I generate safe?

It is created by your browser and shown only on this page. Keep it secret and configure it in your mail server. It is never published; only the public key goes in DNS.

Why 10 lookups?

RFC 7208 limits the DNS queries a receiver must make to evaluate an SPF record, to protect servers from abuse. Going over it is a permanent error.

Which DKIM key size should I use?

2048-bit RSA is the common choice today. Ed25519 keys are also valid and short, but not every receiver supports them yet.

Report a problem