Get SPF back under the 10-lookup limit
Flatten or consolidate includes so SPF stops returning permerror.
30 min
why this matters
Receivers stop after 10 DNS lookups and return permerror. Every message then fails SPF, no matter how correct the rest of the record is.
Step by step
- 1
Count your real lookups
Each include, redirect, a, mx and ptr mechanism costs a lookup — and nested includes inside your providers' records count too. An SPF checker will show the full tree and the total.
- 2
Remove senders you no longer use
Old ESPs and abandoned tools are usually good for two or three lookups each. This is the cheapest fix.
- 3
Drop expensive mechanisms
Remove ptr entirely — it is deprecated and receivers ignore it. Replace a and mx with explicit ip4 ranges if those hosts don't send mail.
- 4
Flatten the stubborn includes
Replace an include with the ip4/ip6 ranges it resolves to, or use a hosted SPF-flattening service that keeps those ranges up to date for you. Never flatten by hand and forget it — provider IPs change.
v=spf1 ip4:203.0.113.0/24 ip4:198.51.100.0/24 include:_spf.google.com -all
how to check it worked
- A validator reports 10 or fewer lookups
- No permerror on test messages
related guides
Publish an SPF record
Tell mailbox providers which servers are allowed to send email as your domain.
Merge multiple SPF records into one
Two SPF records is a permanent failure — combine them.
Set your SPF enforcement correctly
Replace +all or a missing all mechanism with -all.
Publish a DMARC record
Add a monitoring DMARC policy and start collecting reports.