Browser-based email tool · no DNS lookups, keys stay in this tab

SPF, DMARC and DKIM Record Builder

Build and check the DNS records that prove your mail is yours. Everything is computed from the text you enter: nothing queries DNS, so to confirm a record is live, look it up with dig or your DNS host after publishing.

Who may send for this domain

SPF record

Edit the box to check a record you already have.

Publish as a TXT record at example.com

Checks

Look up each provider's record with dig TXT or an SPF checker and count its include, a, mx, exists and redirect terms. This page cannot fetch them.

"-all" is a hard fail: servers not listed are told to reject.
6 of 10 allowed DNS lookups used (2 here plus 4 nested).

SPF, DMARC and DKIM Record Builder and Checker

Operator: Abdulla Al Fahad. How tools are built and checked

Email authentication is four short TXT records that have to agree with each other, and each fails in its own quiet way. An SPF record with eleven DNS lookups is silently treated as broken. A DMARC record with p=none watches but never protects. A DKIM key published in two pieces that were pasted together wrongly just fails verification. Nothing warns you at publish time.

This page builds each record from choices you make, checks records you already have, and says what each setting does. It works on text only and never queries DNS, so it cannot tell you what is currently published or what a provider's include really expands to. For that, run dig TXT on the name after you publish, and use the lookup box below to feed SPF counts that you have looked up.

The order matters. Publish SPF and DKIM first and let mail flow, then add DMARC at p=none to collect reports, tighten the policy once the reports are clean, and add BIMI last, since each record builds on the one before it passing.

Key features

  • SPF builder with ip4, ip6, a, mx, include and redirect, and a validator for terms, qualifiers and ordering
  • SPF lookup estimate: lookups written in the record plus a count you supply for each include
  • DMARC builder and checker for p, sp, pct, rua, ruf, adkim, aspf, fo, ri and rf, including what external report addresses require
  • BIMI record builder and checker that reads your DMARC policy from the DMARC tab
  • DKIM key pair generation with RSA 2048, RSA 4096 or Ed25519 through WebCrypto, with the private key as PKCS#8 PEM
  • DKIM formatter for an existing public key, with a key-size check
  • Long values shown in the zone-file form, split into 255-character quoted strings

What each record type is checked for, and what is not checked

SPF allows ten DNS-querying terms in one evaluation. Each include, a, mx, ptr and exists counts one, and so does a redirect modifier. ip4, ip6 and all cost nothing. The catch is that an include counts one for itself and then every lookup inside the included record counts too, which this page cannot see because it does not fetch DNS. So the total shown is what is written in your record plus the number you enter for each include. A record that lists three providers that each use three further lookups is at 3 + 9 = 12, which makes evaluation fail with a permanent error and receivers treat that as no SPF at all. The checker warns from 8 and errors above 10.

The end of an SPF record decides what happens to everything not listed. -all is a hard fail, ~all a soft fail, ?all is neutral and +all authorises everyone. The checker flags +all as an error, ?all as a warning and a missing all as a warning, notes that anything written after all is never read, that redirect is ignored when all is present, and that ptr is discouraged. IPv4 and IPv6 addresses and prefix lengths are validated, so ip4:203.0.113.0/33 is caught.

DMARC needs v=DMARC1 first and p second, then optional tags. p sets what receivers should do with mail that fails alignment: none, quarantine or reject. pct applies the policy to a share of failing mail, and the remainder gets the next weaker policy. adkim and aspf choose relaxed or strict alignment, where relaxed accepts a subdomain of the organisational domain. rua is where aggregate reports go and must be mailto: addresses, optionally with a size limit such as !10m. When a report address is on a different domain, that domain has to publish a TXT record at yourdomain._report._dmarc.theirdomain containing v=DMARC1, or receivers skip sending reports there; the checker lists the domains that need it.

BIMI is a TXT record at selector._bimi.yourdomain with an https link to an SVG logo in the Tiny PS profile and, for Gmail, a link to a VMC or CMC certificate. It also depends on DMARC enforcement: mailbox providers want quarantine or reject at pct=100, so the BIMI tab reports a p=none policy as blocking. DKIM publishes a public key at selector._domainkey.yourdomain as v=DKIM1; k=rsa; p=<base64 of the SubjectPublicKeyInfo>. For Ed25519 the p= value is the raw 32-byte key, which is why a pasted Ed25519 PEM is unwrapped rather than copied.

Typical uses

  • A new domain sends through Google Workspace and SendGrid: add both includes and enter 4 and 2 nested lookups, and the total of 8 of 10 warns you before a third provider is added.
  • An inherited record with seven includes is suspected of being over the limit: enter each provider's lookup count and see whether the total passes 10, which turns the whole record into a permanent error.
  • A DKIM selector is rotated from s2026 to s2027: generate the new key, publish it under the new name, switch the signer, and remove the old record later.
  • A 4096-bit DKIM key makes a TXT value of about 750 characters, which the zone-file form splits into three quoted strings for a DNS host that rejects one long string.

Building one

  1. Enter your domain and pick the tab for the record you are building. The builder writes the record as you choose.
  2. For SPF, list your own addresses and add each sending service as an include, choosing the ending (-all or ~all) last.
  3. Enter the lookup count of each include, found with dig or an SPF checker, and read the total against the limit of 10.
  4. For DMARC, start at p=none with a report address; for DKIM, generate a key pair or paste the public key you already have.
  5. Copy each value (or the zone-file form if it is over 255 characters), publish it as a TXT record at the host shown, and look it up with dig to confirm.

Example

SPF form

ip4: 203.0.113.10
mx: on
include: _spf.google.com (you enter 4 nested lookups)
Everything else: -all

Record and checks

v=spf1 ip4:203.0.113.10 mx include:_spf.google.com -all
"-all" is a hard fail.
6 of 10 allowed DNS lookups used (2 here plus 4 nested): mx costs 1, the include costs 1, and the 4 you entered cover the provider's own record.

Tips for best results

  • Start DMARC at p=none with a rua address, read the reports for a few weeks, fix the legitimate senders that fail, then move to quarantine and reject. Going straight to reject blocks your own newsletters if one sender is unaligned.
  • Prefer ip4 and ip6 entries for servers you control. They cost no lookups, and leave more room for providers that only offer an include.
  • Use a dated selector such as s2026 so that the next rotation does not collide with the current key.

Things to check before you rely on it

A domain must publish one SPF record. Two TXT records that both start with v=spf1 produce a permanent error, so merge them instead of adding a second.

This page does not look anything up. A record that looks correct here can still be missing, misspelled in DNS, or overridden by something else published at the same name.

A DKIM private key generated in a browser tab is for the server that will sign, not for storing. Copy it into your mail system or secret store straight away; the page keeps nothing.

Some DNS panels add quotes or split long values automatically. If you paste the zone-file form into one that does that, you can end up with doubled quotes; paste the plain value there instead.

Common errors and how to fix them

"11 DNS lookups counted"
Remove a provider you no longer use, replace a, mx or ptr with explicit ip4 ranges, or ask your providers for a flattened include. Redirect also counts one.
"Reports go to other domains" for DMARC
Ask the report receiver to publish yourdomain._report._dmarc.theirdomain as a TXT record with the value v=DMARC1, or send reports to an address on your own domain.
"That is a private key. Never publish it"
The DKIM formatter wants the public key. Derive it with openssl rsa -in private.pem -pubout and paste that.

What each DMARC policy asks receivers to do

The policy is a request, not a guarantee; receivers decide how to apply it, which is why reports matter more than the setting.

  • p=none: deliver as usual and send reports, with no protection yet
  • p=quarantine: treat failing mail as suspicious, usually the spam folder
  • p=reject: refuse failing mail during the SMTP exchange
  • pct below 100: apply the policy to that share of failing mail and the next weaker policy to the rest
  • sp: a separate policy for subdomains, which otherwise follow p

Include domains the SPF builder offers

The buttons add the commonly documented include domain for each service. Providers change these, so confirm the value in the provider's own setup guide, and remember that each one costs a lookup plus whatever it nests.

  • Google Workspace: _spf.google.com
  • Microsoft 365: spf.protection.outlook.com
  • Amazon SES: amazonses.com
  • SendGrid: sendgrid.net
  • Mailgun: mailgun.org
  • Mailchimp: servers.mcsv.net
  • Postmark: spf.mtasv.net
  • Zendesk: mail.zendesk.com

Frequently asked questions

Why can't the page count my include lookups for me?

That would need DNS queries to each included domain, and this page makes none. You enter the count for each provider, and the total updates.

Is RSA 2048 or Ed25519 better for DKIM?

RSA 2048 is verified everywhere. Ed25519 keys are tiny and fast, but not every receiver verifies them, so senders who use them usually sign with both an RSA and an Ed25519 key.

If SPF passes, does DMARC pass?

Only when the domain SPF checked also matches the visible From domain. DMARC needs SPF or DKIM to pass and align; a message sent through a provider's own bounce domain can pass SPF and still fail DMARC.