What SPF does
Anyone can put your address in the From line of an email. SPF is how your domain says which servers are really allowed to send for it. When an email arrives, the receiving inbox looks up your SPF record and checks whether the sending server is on the list.
If it isn't, the email is more likely to land in spam or be rejected, especially if you also have a DMARC policy.
What an SPF record looks like
It's a single TXT record on your domain (the name is usually "@"). It starts with v=spf1, lists who may send, and ends with a rule for everyone else:
v=spf1 include:_spf.google.com include:spf.preping.com ~allThe parts, one by one
- v=spf1: marks the record as SPF. Always first.
- include:…: allows another service's servers, such as your email provider.
- ip4: / ip6:: allows a specific server address.
- ~all: everything else is suspicious (a "soft fail"). The safe default.
- -all: everything else must be rejected (a "hard fail"). Use it once you're sure the list is complete.
The mistakes that break SPF
- Two SPF records on the same domain. Inboxes treat that as an error and SPF fails. Merge them into one record with several include: parts.
- More than 10 DNS lookups. Each include:, a, mx and redirect counts. Go over 10 and SPF fails. Remove services you no longer use.
- Using +all. It allows the whole internet to send as you. Never use it.
- Forgetting a service. If your CRM or helpdesk sends as you, it needs to be in the record too.
How to check yours
Run your domain through the free email setup checker. It reads your live SPF record, counts its lookups and tells you in plain English if anything is wrong.
Questions
Is SPF enough on its own?+
No. SPF checks the hidden "envelope" sender, not the From address people see. You need DKIM and DMARC too for full protection and good delivery.
Should I use ~all or -all?+
Start with ~all. Move to -all once you're confident every service that sends as you is listed.
How long does an SPF change take?+
Usually minutes, sometimes up to a few hours while DNS caches update.