Free SPF Record Generator
Build a secure SPF record by selecting your email service providers.
Why Every Domain Needs an SPF Record
An SPF record is one of the first DNS entries you should publish when setting up email for any domain. Without it, any mail server on the internet can send email claiming to be from your domain, and receiving servers have no way to determine whether the message is legitimate. SPF provides the foundation for email authentication — it explicitly declares which IP addresses and services are allowed to send on your behalf. This is also a prerequisite for DMARC alignment, meaning your DMARC policy cannot enforce on the SPF side without a valid SPF record in place.
How to Use Our SPF Generator
Our generator guides you through building an SPF record step by step. Add the IP addresses (ip4/ip6) of your own mail servers, then add include statements for any third-party services that send email on your behalf — common examples are Google Workspace (_spf.google.com), Microsoft 365 (spf.protection.outlook.com), Mailchimp (servers.mcsv.net), SendGrid (sendgrid.net), Amazon SES (amazonses.com), and Salesforce. Select your 'all' mechanism: -all for hard fail (recommended when all senders are listed) or ~all for soft fail during initial deployment. The tool validates syntax in real time, counts DNS lookups, and warns you before you exceed the 10-lookup limit.
Best Practices for SPF Records
Keep your SPF record as lean as possible. Only include mechanisms for services that actively send email from your domain — remove entries for decommissioned platforms. Use -all (hard fail) once you are confident all legitimate senders are listed. Avoid using the +all qualifier under any circumstances, as it authorizes the entire internet to send from your domain. Test your record with our SPF Raw Checker before publishing to DNS. After publishing, verify the live record with our SPF Record Checker to confirm it resolves correctly and the DNS lookup count is within limits.
SPF and the Bigger Authentication Picture
SPF alone is not sufficient for email security. It authenticates the envelope sender (Return-Path) but does not protect the visible From header that users see. This is where DMARC comes in — it requires alignment between the domain in the From header and the domain authenticated by SPF (or DKIM). By combining a well-crafted SPF record with DKIM signing and a DMARC policy, you create a layered authentication framework that protects your domain from spoofing, improves email deliverability, and meets compliance requirements from Google, Yahoo, and regulatory bodies.
