Skip to main content
HighEmail

How to fix: SPF Exceeds 10 DNS Lookup Limit

The SPF record triggers more than 10 DNS lookups during evaluation. RFC 7208 mandates a maximum of 10 DNS lookups; exceeding this causes a permerror, causing SPF to fail for all messages.

Why it matters

When SPF returns permerror due to too many lookups, receivers may treat all mail from your domain as unauthenticated. Combined with a DMARC p=reject policy, this causes legitimate mail to be rejected.

Each include:, a:, mx:, ptr:, and exists: mechanism in SPF counts as a DNS lookup. Nested includes recursively count their own lookups against the 10-lookup limit. Exceeding this limit results in a permerror, which some receivers treat as a hard fail.

How to fix it

  1. 1Replace include: for senders with static IP ranges using ip4: or ip6: mechanisms.
  2. 2Flatten deeply nested SPF includes using tools like dmarcian's SPF Surveyor.
  3. 3Verify the lookup count with: dig TXT example.com | grep v=spf1

Code examples

Flattened SPF

DNS
example.com. IN TXT "v=spf1 ip4:203.0.113.0/24 ip4:198.51.100.10 include:_spf.google.com -all"
# Use ip4:/ip6: instead of include: where possible

References

Detected automatically by VulnRadar. The check id is email-spf-lookup-count-too-high, stable across every scan so you can filter or diff on it.

See every email check

Questions

How severe is SPF Exceeds 10 DNS Lookup Limit?
VulnRadar rates this high severity in the email category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id email-spf-lookup-count-too-high, which stays the same between runs so you can filter, diff, or gate CI on it.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for spf exceeds 10 dns lookup limit

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: SPF Exceeds 10 DNS Lookup Limit | VulnRadar