Technical details
How the SPF, DMARC and DKIM Builder works
How the SPF, DMARC and DKIM Builder reads a domain’s records, counts SPF lookups, flattens includes, runs its dry runs and handles DKIM keys. For a walk through using it, read Using the SPF, DMARC and DKIM Builder.
What runs where
Loading a domain and counting SPF lookups run on our servers, because they need DNS. Everything else runs in your browser: building the records, the DMARC rollout plan, both dry runs, reading a pasted DKIM key and making a key pair. Nothing you type into the DMARC or DKIM builders is sent anywhere.
Loading a domain
A load makes these lookups through public DNS over HTTPS, one request each, with no retries:
| Record | Name looked up | Type |
|---|---|---|
| SPF | the domain | TXT, kept when it starts with v=spf1 |
| DMARC | _dmarc. plus the domain | TXT, kept when it starts with v=DMARC1 |
| Mail servers | the domain | MX |
| DKIM (with a selector) | selector._domainkey. plus the domain | TXT |
When a subdomain has no DMARC record, its parents are checked in turn, closest first, and the first record found is shown as inherited. If the domain publishes exactly one SPF record, it is counted the same way as a draft.
Counting lookups live
A count walks the record the way a receiver would, using the same walk as Email Validation (described in SPF record expansion and macros): it follows each include and redirect, counts every term that needs a lookup (RFC 7208 section 4.6.4), notes names with no SPF record (void lookups, limited to 2), loops, and terms after an all that are never reached. A redirect= is ignored when the record has an all term, as the RFC requires.
The walk makes at most 20 DNS queries per count. A record that needs more stops there and says the real total may be higher. Terms that use macros, such as %{i}, are counted but not expanded for every possible sender. The page asks for a count about a second after the form stops changing and keeps each answer, so switching back to a record you already counted is instant.
The typical costs shown before a count were measured in November 2026 and are only an estimate; the live count always wins.
When an include can be flattened
An include can be flattened when it and every include under it hold only pass ranges (ip4, ip6) and further includes, ending in an all term. Anything that depends on the sender or on another lookup (a, mx, exists, ptr, redirect, macros) or that excludes addresses (-ip4 and the like) makes it impossible to write as a fixed list, and so does a lookup that failed. Includes with more than 60 ranges aren’t offered either, because the record would grow past the size receivers handle well.
Record size
RFC 7208 section 3.4 suggests keeping the DNS answer under 450 bytes, so it fits in one UDP packet even for older resolvers. The builder warns when the SPF record passes that size. Any TXT value longer than 255 bytes is split into several strings in the zone file line; receivers join them back together. DNS providers’ web forms usually split long values for you.
What the dry runs assume
The SPF dry run reads the draft in order and stops at the first term that matches the address. It knows the ranges in the record and the ranges behind each include from the live count. It doesn’t look up a, mx or exists terms, so an address that reaches one first gets unknown, and with no all term the result is neutral (RFC 7208 section 4.7).
The DMARC dry run decides alignment by comparing organizational domains. Receivers find the organizational domain with the DNS tree walk in RFC 9989 section 4.10; the dry run estimates it from the name, treating common two-part endings such as co.uk as one suffix. The policy for a subdomain is sp= when set, otherwise p=; test mode (t=y, or pct=0 for older receivers) lowers it one step.
Report authorization records
When an rua or ruf address is outside the domain’s organizational domain, receivers only send reports once that other domain publishes a TXT record of v=DMARC1 at the name made of your domain, _report._dmarc. and its own domain (RFC 9990 section 4). The builder lists one such record per outside domain.
DKIM keys
A pasted key is read as PEM or base64. RSA keys can be SubjectPublicKeyInfo, the form OpenSSL and most mail servers print, or the bare RSAPublicKey structure RFC 6376 names; the builder keeps the form you pasted and reads the modulus size from it. An Ed25519 key is written as the raw 32-byte value RFC 8463 requires, so a pasted SubjectPublicKeyInfo is shortened to that.
Generated keys come from the Web Crypto API in your browser: RSA with 2048 bits and exponent 65537, or Ed25519 where the browser supports it. The private key is exported as PKCS #8 PEM and exists only on the page until you save it.
Limits
Loads and counts have hourly and daily allowances per visitor, larger for counts because they run as you edit. When one runs out, the meter keeps showing estimates and the notice under it says when counting can resume.
FAQ
Why does the live count differ from the typical cost?
Providers change their records. The typical figures were measured once; the live count reads today’s records.
Does the builder publish anything?
No. It only reads public DNS. You publish the records with your DNS provider.
Is my private key sent to DNS Panopticon?
No. Key pairs are made in your browser and the private key never leaves the page.
Sources and further reading
- RFC 7208: Sender Policy Framework (SPF)
- RFC 9989: Domain-Based Message Authentication, Reporting, and Conformance (DMARC)
- RFC 9990: DMARC Aggregate Reporting
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
- RFC 8301: Cryptographic Algorithm and Key Usage Update to DKIM
- RFC 8463: A New Cryptographic Signature Method for DKIM (Ed25519)