Free SPF Record Generator Build a Valid SPF Record
Build a valid SPF record without memorizing syntax. Add your sending services as includes, any dedicated IPs, pick an enforcement policy, and copy the generated record straight into your DNS as a TXT entry.
How this check works
- 01
Enter include domains (e.g. _spf.google.com for Google Workspace), IPv4 addresses, and whether your MX/A hosts also send.
- 02
Choose the closing policy: -all (strict) or ~all (soft fail).
- 03
The generator assembles the record, validates the syntax, and warns if you approach the 10-lookup budget.
How to fix common problems
Where does the record go?
Create a TXT record at your root domain (@) with the generated value. One SPF record per domain merge, never duplicate.
Subdomains need their own
SPF does not inherit to subdomains. If you send from mail.example.com, publish a record on that subdomain too.
Common includes for cold email
Google Workspace: include:_spf.google.com. Microsoft 365: include:spf.protection.outlook.com. Zoho: include:zoho.com. SendGrid: include:sendgrid.net. Mailgun: include:mailgun.org. Instantly and Smartlead send through your Google or Microsoft mailboxes, so they need no extra include.
Too many DNS lookups
SPF allows a maximum of 10 DNS lookups. Every include, a, mx and redirect counts. Remove services you no longer use, or replace includes with ip4 ranges, to stay under the limit.
Example
Google Workspace + a dedicated IP → v=spf1 include:_spf.google.com ip4:203.0.113.10 -all
FAQ
- How do I create an SPF record?
- List every service that sends email for your domain, add each one's include, add any dedicated IPs, and finish with -all or ~all. This generator assembles and validates it, then you paste it into DNS as a TXT record.
- Where do I publish the SPF record?
- In your DNS provider (Cloudflare, GoDaddy, etc.) as a TXT record with host @ and the generated value.
- How do I find my ESP's include?
- Every reputable ESP documents it: Google uses _spf.google.com, Microsoft 365 uses spf.protection.outlook.com, and so on.
- Should I use -all or ~all?
- Use ~all while you are setting up and confirming every sender is listed, then move to -all for strict protection once DMARC reports look clean.
- Can I have two SPF records?
- No. Two SPF records on the same domain cause a permerror and SPF fails entirely. Merge all includes into a single record.
- Does SPF alone stop spoofing?
- No SPF only covers the envelope sender and breaks on forwarding. Pair it with DKIM and enforce with DMARC.
Related tools
Related resources
Want this handled end-to-end?
We build and run the whole outbound system infrastructure, lists, and copy live in 10 days.
See the cold email system