SPF record generator
Tick every service that sends email for your domain, add your own server IPs, and copy the finished record into your DNS. Nothing is uploaded.
| Type | TXT |
| Name | @ |
After you add it, confirm it works with the SPF, DKIM and DMARC checker.
What an SPF record does
SPF is a list, published in your DNS, of the servers allowed to send email for your domain. When Gmail or Outlook receives a message from you, it looks up that list. If the sending server is on it, SPF passes. If not, the message looks forged and is far more likely to land in spam.
One record only
List every service in a single v=spf1 record. A second record breaks both.
Stay under 10 lookups
Each include costs a DNS lookup. Remove services you no longer use.
Then add DMARC
SPF needs DMARC to protect your From address. Create a DMARC record.
Questions
Can a domain have two SPF records?
No. A domain must have exactly one TXT record that starts with v=spf1. If you use several email services, put all of them in the same record. Two SPF records make both invalid.
What is the difference between ~all and -all?
~all (soft fail) asks receivers to accept mail from unlisted servers but treat it as suspicious. -all (hard fail) asks them to reject it. Start with ~all, and move to -all once you are sure every service you send from is listed.
What is the 10 lookup limit?
Each include, a, mx and redirect in your record costs one DNS lookup, and SPF allows 10 in total. Go over it and SPF fails for every email. This generator counts them for you.
Where do I add the record?
In the DNS settings of your domain (Cloudflare, Namecheap, GoDaddy and so on). Add a TXT record, set the name to @ and paste the value.
Is SPF enough by itself?
No. Gmail and Yahoo also expect DKIM and DMARC from bulk senders. SPF only says which servers may send. DKIM signs the message and DMARC ties both to your From address.
More free tools
Records done? Test a real email.
Send one message to our mail tester and get a score out of 10 with every check explained.