Help · Email and spam
How to set up SPF (with examples)
Direct answerDNSFix help, reviewed 2026-11-12The answer in one or two sentences. The steps below show how to do it. Our editorial policy says how we write and check these pages. Learn more
SPF is one TXT record on your domain that lists every service allowed to send email as you.
At a glance
The key facts on this page, in plain words. Our editorial policy says how we check them.- What we found: 3 key facts.
- How many
- Exactly one SPF recordTwo SPF records make SPF fail (RFC 7208).
- Lookup limit
- 10More than 10 DNS lookups inside it makes SPF fail.
- Ending
- ~all or -all~all marks other senders as suspicious, -all rejects them.
What it looks like
v=spf1 include:_spf.google.com include:servers.mcsv.net ~all
That says: your mailbox service and your newsletter tool may send as this domain; treat anything else as suspicious.
Fix it
- List every service that sends email with your domain in the From address: your mailbox provider, newsletter tool, CRM, website forms, invoicing.
- Find each one's SPF "include" in its help pages (or use our SPF generator).
- Create one TXT record at the root of your domain (host
@) with all includes, ending in~all. - If you already have an SPF record, edit it. Never add a second one.
- Re-run the check. It also counts your DNS lookups, which must stay at 10 or fewer.
Stop it happening againDNSFix can check your domain on a schedule and email you when something changes.
DNSFix Pro checks your domain every 4 hours and emails you the step-by-step fix soon after we spot a problem. From $19 a month.Questions
Should SPF end in ~all or -all?
Start with ~all (soft fail). Once DMARC is at reject, ~all is fine because DMARC does the enforcing; -all adds little and can break forwarding.
Related
- SPF PermError: too many DNS lookups
- Multiple SPF records found
- How to set up DKIM (and fix "DKIM not found")
- How to set up DMARC: p=none, quarantine and reject
Product names belong to their owners. DNSFix isn't affiliated with them.