SPF Record Generator
Build a valid SPF record for your domain. Select your email providers, add any custom sending IPs, choose your enforcement policy, and copy the generated TXT record to add to your DNS.
Build a valid SPF record for your domain. Select your email providers, add any custom sending IPs, choose your enforcement policy, and copy the generated TXT record to add to your DNS.
Building an SPF record by hand means memorizing the syntax for includes, ip4 ranges, mechanisms, and qualifiers. This generator does it for you. Select your email providers from a list, add any custom sending IPs, choose your enforcement policy, and the tool assembles a valid SPF TXT record in real time. It also counts DNS lookups against the 10-lookup limit defined by RFC 7208 and warns you if you are approaching it. The generated record is ready to copy and paste into your DNS provider.
Check the boxes for each email service that sends mail on behalf of your domain (Google Workspace, Microsoft 365, SendGrid, Mailchimp, etc.). Enable the MX or A mechanisms if your web server or mail server should be authorized. Add any custom IP addresses or additional include domains. Choose your enforcement policy: ~all (soft fail) is a safe starting point, -all (hard fail) is recommended once you have confirmed all senders. The record updates live as you make changes — click it to copy.
Start with ~all (soft fail) while you audit your senders, then switch to -all (hard fail) once everything is verified. Keep an eye on the DNS lookup counter — every include, a, mx, and redirect counts as one lookup, and the total across all levels of recursion must not exceed 10. If you are over the limit, replace includes with explicit ip4 entries (called "flattening"), though you will need to update them manually if the provider changes their IPs.
Need reliable hosting? These free tools are brought to you by Ultra Web Hosting. Fast, secure shared and reseller hosting with 24/7 expert support. View hosting plans →