Tools
SPF Generator
Create a safer SPF record.
What the SPF generator builds
Type the services that send mail for your domain, separated by commas, and the generator returns one SPF TXT value. It recognises Google Workspace, Microsoft 365 (or Office 365), Amazon SES, Mailchimp and SendGrid and adds the include each of them publishes. Names it does not recognise are left out rather than guessed, so check the result against your provider's own documentation.
The value always ends in ~all (softfail). That is a deliberate starting point: mail from a server that is not listed is marked suspicious instead of being rejected outright while you confirm you have listed every sender.
v=spf1 include:_spf.google.com ~allv=spf1 include:_spf.google.com include:amazonses.com include:sendgrid.net ~allPublish it as a single TXT record
Add the value as a TXT record at the root of the domain (Host or Name @ at most DNS providers). A hostname may carry only one record that starts with v=spf1. If one already exists, merge the new include into it instead of adding a second record; two SPF records make SPF evaluation return a permanent error, which receivers treat as a failure.
Long values are fine. DNS stores TXT data in strings of up to 255 characters, and most DNS panels split a longer value automatically. Receivers join the strings back together before reading the policy.
Before: v=spf1 include:_spf.google.com ~all
After: v=spf1 include:_spf.google.com include:servers.mcsv.net ~allStay under the 10-lookup limit
SPF allows at most 10 mechanisms that cause a DNS lookup during evaluation: include, a, mx, ptr, exists and the redirect modifier. The limit counts nested lookups too, so one include that itself contains four includes uses five. ip4, ip6 and all do not count. Lookups that return no answer are also capped: after two void lookups, evaluation fails.
Exceeding the limit produces a permerror, so mail can fail SPF even though every sender is listed. Remove includes for services you no longer use, and prefer ip4 or ip6 ranges only for servers you run yourself; copying a provider's current IP ranges into your record breaks silently when they change.
From ~all to -all
~all (softfail) says unlisted servers are probably not authorised. -all (hardfail) says they are definitely not. ?all is neutral and offers almost no protection. Move to -all only after real messages from every application, form and newsletter tool pass SPF, and keep DMARC in mind: DMARC, not the SPF qualifier alone, is what tells receivers to quarantine or reject mail that fails.
After saving, run the SPF checker to confirm there is one record and to count its lookup-causing mechanisms, then send a real message and read the Authentication-Results header.
Frequently asked questions
Does a domain that only receives mail need SPF?
No. SPF lists servers allowed to send for a domain. A domain that only receives mail, such as a Free Domain Mail catch-all inbox, does not need it. If the domain sends through Free Domain Mail, add include:_spf.freedomainmail.com to its one SPF record; if it sends through another provider, add that provider's include.
Why is my provider missing from the generator?
The generator only adds includes it knows. For any other service, copy the include or ip4/ip6 range from that provider's documentation into the same record.
Should I use +all?
No. +all authorises every server on the internet to send as your domain, which defeats the purpose of SPF.
Does SPF check the From address people see?
SPF checks the envelope sender (Return-Path). DMARC is what ties a passing SPF result to the visible From domain through alignment.
Overview
Create a safer SPF record.
Authentication is the foundation
TXT proves control. MX directs incoming mail. SPF, DKIM and DMARC give receivers evidence that your messages are legitimate.
How SPF, DKIM and DMARC fit together: read the email authentication overview.