SPF record generator
Tick the services that send email as your domain. You get one SPF record to paste, and its count of DNS lookups out of the 10 allowed.
Not listed? Add its include or IP address in the next step.
An IP address like 203.0.113.10, an include like include:mail.example.net, or paste your whole current record. Separate entries with spaces or new lines.
Your SPF record
Tick the services you send from, or add your own entries, and your record appears here with its lookup count.
Already have an SPF record?
A domain can have only one. If you add a second, receivers return an error and SPF fails for all your mail. Replace the old record with the new one. If the record you have already fails with too many DNS lookups, the SPF lookup counter shows which include costs the most.
Enter your domain and we read the record it publishes now. Merge it, and the senders we know are ticked and the rest go in the box for your own entries.
SPF record examples for Google Workspace, Microsoft 365 and more. Multiple SPF records: why two break SPF and how to merge them
Paste it, then check that it worked.
We never change your DNS. This page gives you the record, and you paste it where your DNS is managed. We only read public records.
Once it's published, run your domain through the free email authentication check to confirm receivers see one valid record. Monitoring rechecks it every day and emails you when a new sender or a change breaks it. SPF is half the job: the DKIM record generator gives you each sender's DKIM record too.
Questions
How many DNS lookups can an SPF record have?
Ten. Each include, a, mx, ptr, exists and redirect term counts as one, and the lookups inside an included record count too, so a single include can cost several. ip4 and ip6 terms cost nothing. Go over 10 and receivers return a permerror, which means SPF fails for all of your mail, not only for the last sender you added.
Should I end my SPF record with ~all or -all?
Start with ~all. It marks mail from servers you did not list as suspicious instead of failing it, which is the safe choice while you find every sender. Switch to -all once you are sure the list is complete, so mail from unlisted servers fails. Either way, your DMARC policy does most of the deciding about what receivers do with mail that fails.
Can I have two SPF records on one domain?
No. A domain gets one SPF record. Two records make receivers return a permerror, and SPF fails. If you find a second one, merge it into the first and delete it. The box on this page reads your current record and can merge it into the generator for you.
Where do I paste my SPF record?
Add it as a TXT record at the root of your domain, in the DNS host that serves your domain. Set the host or name to @ (some hosts want the domain name or an empty field instead). If you already have an SPF record, replace its value rather than adding a second record. Google says a DNS change can take up to 48 hours to take effect.