Runs in your browser
SPF record generator
Build an SPF record from the services that send mail for your domain, then count the DNS lookups it needs against SPF’s limit of 10.
Who sends mail for your domain?
TXT record at your domain
Rules that break SPF
- A domain may publish only one SPF record; two make receivers return an error (RFC 7208). Merge them into one.
- Every
include,a,mx,ptr,existsandredirectcosts a DNS lookup, nested includes count too, and more than 10 is a permanent error. The count above follows each include. - Gmail and Yahoo require SPF or DKIM from every sender, and both plus DMARC from bulk senders (sender requirements).
Reading the result
- The line under the form is the whole TXT record for your domain’s own name, starting
v=spf1. It updates as you type. ip4andip6entries cost no DNS lookup;mx,aand eachincludecost one, plus the lookups inside the include.- Needs N of the 10 DNS lookups: at 10 or fewer the record is within the limit; above 10, a receiver that reaches the eleventh lookup returns a permanent error (permerror), so mail from senders listed late in the record can fail SPF.
- Has no SPF record: an include points at a domain without one, which is also a permanent error. Copy the include again from the service’s setup page.
- Skipped: an entry that is not an IP address, a range or a domain was left out of the record.
Common mistakes
- Switching to
-allbefore every service that sends for the domain is listed: receivers may reject mail from the one you forgot. Start with~all. - Ticking the A record when the web host does not send mail. It spends a lookup and authorises a server that should not send.
- Keeping includes of services you stopped using; each one still spends lookups.
- Replacing an include with the service’s current addresses to save lookups: the record breaks when the service changes them.
- Guessing an include domain. It is often not the service’s website domain, so copy it from the setup page.
What this generator does not check
- The count follows each include as it is published today. Services change their records, so a record close to 10 can go over with no change on your side.
- It does not count void lookups, names that return no record; RFC 7208 recommends failing after two.
- It builds a record and does not read the one your domain already publishes. The SPF Checker linked below does that.
- Lookups go from your browser to Cloudflare’s public DNS-over-HTTPS service; MyIPScan does not see the domains you enter.