SPF Record Generator
Build a valid SPF TXT record with IPs, includes and provider presets.
About this tool
Use this generator to build a Sender Policy Framework (SPF) TXT record for your domain. Add the IPv4 and IPv6 addresses of your mail servers, pick common email provider includes (Google Workspace, Microsoft 365, SendGrid, Mailchimp and more), optionally authorize your MX or A records, and choose a default action (~all for testing, -all for production).
The tool estimates DNS lookup count against the RFC 7208 limit of 10 and warns before you publish a record that receivers may reject. Copy the generated record into a single TXT record on your root domain — never publish more than one v=spf1 record.
Frequently asked questions
What should I use for the default action?
Use ~all (softfail) while testing and validating all senders. Once every legitimate service is included, switch to -all (fail) for stronger protection against spoofing.
Can I combine presets with custom includes?
Yes. Select any provider presets and add custom include domains in the text box. The generator merges them into one SPF record.
What is SPF redirect=?
redirect= points SPF evaluation to another domain's SPF record entirely, replacing all local mechanisms. Use it only when another domain fully controls your authorized senders.