SPF Lookup Counter
Count a domain's SPF DNS lookups and flag the 10-lookup limit.
The SPF Lookup Counter fetches a domain's SPF record (v=spf1) and then recursively follows its include, redirect, a, mx, ptr and exists mechanisms, summing the DNS lookups they trigger. RFC 7208 limits a single mail evaluation to 10 DNS lookups; exceeding it causes receiving servers to return permerror, which can fail SPF authentication entirely.
If your mail keeps landing in spam or SPF won't pass, blowing past this 10-lookup limit is a common cause. Enter a domain and the tool expands the include chain to show exactly how many lookups you consume today and where the count grows. Once you see the breakdown, consider SPF flattening to cut it down. View the raw SPF record and its mechanisms in SPF Record Lookup, and your domain's overall authentication in Email Deliverability Check.
The SPF 10-lookup limit
During SPF evaluation, the mechanisms that trigger DNS lookups are include, a, mx, ptr, exists and the redirect modifier. If their total exceeds 10, RFC 7208 mandates a permerror. By contrast, ip4, ip6, all and exp trigger no DNS lookups and do not count toward the limit.
- include: pulls in another domain's SPF — 1 lookup itself, plus its nested lookups
- a / mx: A/MX lookup for a host — 1 each (one per mechanism, even with multiple MX)
- ptr: a discouraged mechanism — 1 lookup
- exists: an A lookup after macro expansion — 1 lookup
- redirect= delegates to another domain's SPF — 1 lookup
How to reduce it (SPF flattening)
The most common fix is SPF flattening: resolve the IP ranges that your include chain ultimately points to and replace them with direct ip4/ip6 terms, eliminating nested lookups. The trade-off is that you must re-update the record whenever a provider's IPs change, so use an auto-updating service or review it regularly. Drop includes for mail providers you no longer use, and if needed split SPF across subdomains by service.