What is SPF 10 lookup limit?
The rule that an SPF check may trigger at most 10 DNS lookups, or it fails with a permerror.
How it works in practice
Each include, a, mx, ptr, exists and redirect term counts as a lookup, including those inside the records you include. A record that looks short can be over the limit once the includes of Google, Microsoft and a few sending tools are expanded. Ways out are removing unused senders, moving bulk senders to a subdomain, or flattening part of the record into IP ranges.
What counts as a lookup
The limit is set by the SPF standard (RFC 7208). The terms include, a, mx, ptr and exists and the redirect modifier each cost one DNS lookup, and so does everything inside an included record. The terms ip4, ip6 and all cost nothing, because they need no lookup. The mx term can also trigger further address lookups for each mail host it returns.
What happens when you go over
On the eleventh lookup the receiver stops and returns a permanent error (permerror). That counts as an SPF failure for all your mail, even when every sender in the record is legitimate. A second, smaller limit allows at most two lookups that return nothing (void lookups), so typos in includes also break the record.
How to get back under the limit
Remove services you no longer send from, move bulk or marketing senders to a subdomain with its own record, and replace includes with the IP ranges they resolve to (flattening) where it is safe. Check the real count with a tool that follows nested includes, because the number of includes in the record is not the number of lookups.
The common mistake
Flattening the whole record and forgetting it: the IPs are a snapshot, and when a provider changes them your mail starts failing SPF silently.
Frequently asked questions
Is the limit 10 includes?
No, it is 10 DNS lookups in total. One include can cost several lookups, because the record it points to has includes of its own.
Does every receiver enforce the limit?
Most major receivers do. Some are lenient, which is why a record over the limit can look fine in some tests and fail in others. Do not rely on leniency.
What is the quickest fix?
Delete unused senders. If every sender is needed, give marketing mail its own subdomain with its own SPF record, which splits the lookups across two records.
Check it yourself
Related terms
Not sure whether this is what's hurting your inbox placement? A free deliverability review finds the real cause.
How we help: Consulting · Private infrastructure · Managed mailboxes · Monthly support