SPF Generator
SPF Record Generator
About SPF Generator
Build a syntactically correct SPF record from scratch or import an existing one for editing. Add IPv4 ranges, IPv6 ranges, include: chains for vendors (Google, Microsoft, Mailgun, SendGrid, etc.), and pick the right all-mechanism for your enforcement level. Real-time DNS lookup counter keeps you under the 10-lookup hard limit. Copy the final TXT record ready to paste into your DNS provider.
How the SPF generator works
Build, validate, copy
Add mechanisms
Drop in IP4/IP6 ranges (no DNS lookup), include: chains for vendors, a/mx for your own mail servers. Order them by specificity.
Watch the lookup counter
Each include / a / mx / ptr / exists counts against the 10-lookup limit. The counter updates live so you see exactly when you're approaching PermError.
Pick "all" enforcement + copy
-all = strict (production), ~all = soft fail (rollout), ?all = neutral (testing). Generated record is ready to paste as a TXT record in your DNS provider.
Common gotchas this generator avoids
Mistakes that break SPF
Forgetting v=spf1 prefix
Every SPF record must start with "v=spf1". Without it, receivers ignore the record entirely. The generator adds this automatically.
Multiple SPF records on one domain
Two SPF records on the same domain = invalid SPF, all mail fails authentication. Combine them into one v=spf1 line. The generator helps merge.
Using +all (open relay)
+all tells receivers to accept mail from any source. Spammers love it. The generator warns and defaults to -all.
Adding include: from retired vendors
Mailgun include left in for two years still eats a DNS lookup. The generator marks unused includes so you can clean up.
Mixing ip4 and IPv4 ranges incorrectly
CIDR notation matters: ip4:192.0.2.1 (single IP) vs ip4:192.0.2.0/24 (256 IPs). The generator validates CIDR ranges for you.
Putting -all before specific mechanisms
SPF is evaluated left to right. -all at the front blocks everything before specific allows can match. The generator enforces correct ordering.
FAQ
SPF generator — common questions
What is an SPF record?+
What is the 10 DNS lookup limit?+
Should I use ip4/ip6, include, a, or mx mechanisms?+
What is SPF flattening and when should I do it?+
Why is -all stronger than ~all?+
Other generators
Build your full email auth stack
Beyond Free Tools
Enterprise Cloud & IT Services
From Microsoft 365 migrations to fully managed infrastructure — we handle every layer of your IT stack.
Migration Tools We Use
Enterprise-grade tooling for every platform
- BitTitan MigrationWiz— Cloud-to-cloud email & data
- Microsoft Exchange Hybrid— On-prem to Exchange Online
- ShareGate Desktool— SharePoint & OneDrive
- Microsoft Mover.io— Google Drive to OneDrive
- Entra ID Connect— AD sync & hybrid identity
- PowerShell & EWS API— Automation & bulk ops