Skip to content
SIEMBench
100% Client-Side Tool • Inputs Never Sent to Our Servers

SPF & DMARC Record Generator + Validator

Build SPF and DMARC records, or paste existing ones to see what each part means and what is wrong with it. Copy the result in the format your DNS host uses.

Services that send as your domain
  • Include names were checked on 2026-11-30. Confirm them in your provider's console.

SoftFail: unlisted servers are suspicious. The usual choice with DMARC, because DMARC decides what happens.

DNS record

Your record: DNS lookups

1 / 10Within limit

About 1 with nested includes of the services listed here.

  • InfoNested includes are not looked up

    This page makes no DNS queries. Includes inside an include also count toward the limit of 10, so check the total with a DNS-based tool.

PartMeaning
include:_spf.google.comSenders that pass the SPF record of _spf.google.com get pass. Uses a DNS lookup.
~allEverything else gets softfail.

How to use this tool in a SOC investigation

  1. Get the TXT records of the spoofed domain with your own DNS tool, and paste them in.
  2. Read the findings to see whether a forged sender could have passed.
  3. Build the corrected record, and stage the change with the DNS owner.

Example: A spoofed invoice passed SPF, and the domain publishes v=spf1 include:_spf.google.com +all. The audit rates +all Critical, because every server on the internet then passes SPF for that domain.

Frequently asked questions

What happens if my SPF record needs more than 10 DNS lookups?

Receivers stop and return a permanent error (PermError), and SPF no longer passes for any of your mail, including mail from servers you listed. The limit counts include, a, mx, ptr, exists and redirect, and it also counts the ones inside every include. Remove services you no longer use, replace small includes with ip4, or move a service to a subdomain with its own record.

Should I use ~all or -all?

With an enforced DMARC policy, ~all is usually the better choice. DMARC decides what happens to failing mail and can accept a message whose DKIM signature passes. Some receivers reject on -all before they look at DKIM, which can lose forwarded mail. Use -all for domains that never send mail.

Are the pct and ri tags still valid in DMARC?

RFC 9989, published in May 2026, replaced RFC 7489 and retired pct, ri and rf. Receivers that follow it ignore those tags, while older receivers still apply them. To test a policy under the new standard, use t=y, which asks receivers to apply one level below your policy. The builder can still write pct and ri for older receivers.

Does this tool query my DNS or send my records anywhere?

No. Everything runs in your browser with no DNS queries and no network requests. That means it cannot see nested includes, so the lookup total for services it does not know is a minimum. Confirm the published result with a DNS-based checker.

How SPF, DKIM and DMARC work together

Email has two sender addresses. The envelope sender (MAIL FROM) is used between servers and receives bounces. The header From is the one people see. Nothing in basic email requires them to match or to be true, and business email compromise (BEC) depends on that gap. A message can appear to come from your chief executive while its envelope names a server in another country.

StandardWhat it checksWhat it misses alone
SPFWhether the sending server may use the envelope domainThe visible From address, and forwarding
DKIMA signature over the message by some domainWhether that domain matches the From address
DMARCWhether SPF or DKIM passed for a domain that aligns with the From addressLook-alike domains and compromised accounts

DMARC connects the other two to the address people see. A message passes if at least one of them passes and aligns. DMARC also tells receivers what to do with failures and where to send reports, which is how you find out who is sending as your domain.

This page builds SPF and DMARC. DKIM needs a key pair, so your mail provider generates it and gives you the record to publish. Set up DKIM as well. It survives forwarding, which SPF does not.

The 10-lookup limit and the PermError trap

To protect receivers, RFC 7208 limits an SPF evaluation to 10 terms that cause DNS queries. At the eleventh, the result is PermError and SPF stops passing for all of your mail. Nothing warns you, and delivery may fail only at receivers that enforce the limit.

Counts toward 10Does not count
include, a, mx, ptr, exists, redirectip4, ip6, all, exp

The trap is nesting. Every include brings in another record, and lookups inside it count as well. When checked in November 2026, Mailgun's include used 5 of the 10 by itself, and SendGrid and Zoho used 2 each. A record with five visible includes can already be over the limit. Providers change their records without telling you, so a record that worked last year can break today. The counter shows the exact number in your record and an estimate with the nested lookups of listed services.

Two other limits matter. Receivers should allow only two lookups that return nothing. A single TXT string holds at most 255 characters, so a longer record is split into several quoted strings that receivers join without spaces. The BIND and Cloudflare exports do this for you.

Rolling out DMARC in phases

  1. Monitor. Publish p=none with a rua address. Nothing is blocked. Read aggregate reports for several weeks, long enough to cover monthly invoices and quarterly mailings.
  2. Fix. For each legitimate sender that fails, set up DKIM with your domain or a custom MAIL FROM domain so that it aligns.
  3. Quarantine. Move to p=quarantine, so that failing mail goes to spam. t=y asks receivers that support RFC 9989 to apply one level weaker while you watch the reports. Older receivers ignore it and apply the full policy.
  4. Reject. When the reports are clean, publish p=reject. Check that sp and np are not weaker.
  5. Keep reading reports. New services appear without anyone telling the mail team.
v=DMARC1; p=none; rua=mailto:dmarc@example.com
v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com; t=y
v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com
v=DMARC1; p=reject; rua=mailto:dmarc@example.com

Mailing lists that modify messages break DKIM, and forwarding breaks SPF. Domains whose people post to lists should study the reports with care before they choose reject.

What changed in RFC 9989

DMARC became a standards-track protocol in May 2026, when RFC 9989 replaced RFC 7489. It retires pct, because receivers applied percentages inconsistently, together with ri and rf. It adds t for testing, np for subdomains that do not exist, and psd for public suffix operators. A missing p is now read as p=none, and size limits on report addresses are obsolete. Existing v=DMARC1 records remain valid. Both generations of receivers will coexist for years, so the validator explains what each one does.

Relaxed and strict alignment

Alignment compares the domain that passed SPF or DKIM with the domain in the From address. Relaxed, the default, accepts any name under the same organizational domain, so mail.example.com aligns with example.com. Strict requires an exact match.

From addressDomain that passedRelaxedStrict
example.comexample.comAlignedAligned
example.combounce.example.comAlignedNot aligned
news.example.comexample.comAlignedNot aligned
example.comvendor-mail.netNot alignedNot aligned

Relaxed suits almost everyone, because services commonly send bounces from a subdomain. Strict makes sense when subdomains are run by people you do not fully trust.

Publishing the records

Can I have two SPF records?

No. Two records that begin with v=spf1 on one name are a permanent error. Merge the mechanisms into a single record with one all at the end. A long record is still one record: the TXT value is split into several quoted strings, which receivers join together.