Free tool · no signup
SPF record generator
Tick the services that send email for your domain and get the exact SPF record to publish in DNS. It checks the 10-lookup limit that breaks many records.
By the Bug Circuit security team · Last updated
Who sends email as your domain?
v=spf1 ~all
- Type
- TXT
- Name / host
- @ (your domain)
- DNS lookups
- 0 of 10
- No senders listed. This record tells the world that your domain sends no mail at all, which is right only for a domain that never sends email.
How it works
What SPF does
SPF (Sender Policy Framework, RFC 7208) lets a domain publish the list of servers that may send mail for it. When a message arrives claiming to be from you, the receiving server looks up your SPF record and checks whether the sending server is on the list. If not, it can mark the message as suspicious or reject it.
The record starts with v=spf1, then lists mechanisms such as include:_spf.google.com (trust Google's servers), ip4:203.0.113.5 (trust one address), mx (trust the servers in your MX records) and ends with an instruction for everyone else: ~all (soft fail), -all (reject) or ?all (neutral).
The two rules that break most records
One record only. A domain must have a single SPF TXT record. If you add a second one, for example when you start using a new email service, receivers see two records and treat SPF as broken (a PermError). Merge the new include into your existing record instead.
Ten lookups at most. Every include, a, mx, ptr, exists and redirect makes the receiver do a DNS lookup, and the services you include have includes of their own. Past 10 in total, SPF fails. This generator counts the lookups you add and warns as you approach the limit, but it cannot see inside every provider's record, so test the published result.
SPF is one of three checks
SPF alone does not stop someone from faking the visible From address. DKIM signs your messages, and DMARC tells receivers what to do when SPF and DKIM do not line up with the From domain. Set up all three. After publishing, run the email spoofing checker to confirm they work together.
Worked examples
Google Workspace only
One service: Google Workspace. Soft fail for everyone else.
v=spf1 include:_spf.google.com ~all
The most common record for a small business. Move to -all after a few weeks of clean DMARC reports.
Google plus a newsletter service and your own server
Google Workspace, SendGrid and a server at 203.0.113.5.
v=spf1 ip4:203.0.113.5 include:_spf.google.com include:sendgrid.net ~all
Three senders, three lookups at most from your own record. Each provider adds some of its own.
A domain that never sends mail
Parked or brand-protection domains.
v=spf1 -all
Tells the world nothing is allowed to send as this domain, which stops it being used in phishing.
Frequently asked questions
Can I have two SPF records on one domain?
What is the difference between ~all and -all?
How many includes can I use?
Do I need SPF if I already have DKIM and DMARC?
Why does my record say PermError?
Does SPF apply to subdomains?
Keep reading
See what attackers see, for free
Run the free passive check on your website. No login, no impact on your site, results in seconds.
Ready for the full manual audit? See pricing