Troubleshooting7 min read · Updated Jun 2026

The DNS lookup limit, and how ClearSPF keeps you under it

RFC 7208 caps SPF evaluation at exactly 10 DNS lookups. Almost every growing company hits this limit eventually. The result is silent authentication failures for all your mail.

Why the limit exists

SPF is evaluated in real time during the SMTP connection, before an email is accepted. An unbounded lookup chain would let a single SPF check trigger hundreds of DNS queries. That would create a denial-of-service vector against receiving mail servers. The 10-lookup cap (defined in RFC 7208, section 4.6.4) is a hard limit: when a receiver hits lookup 11, it is required to return permerror, which DMARC treats as an SPF failure.

What counts as a lookup

Each of the following mechanisms triggers at least one lookup:

MechanismLookup cost
include:1 (plus whatever the included record itself uses)
a:1
mx:1 + 1 per MX host resolved
redirect=1 (replaces the current record evaluation)
ip4: / ip6:0 (no DNS lookup required)

A single include:_spf.google.com expands to 3–5 lookups internally. Add Microsoft, SendGrid, Mailchimp, and Salesforce and you are already at 12–18 lookups, well past the limit.

The traditional workaround: SPF flattening

Flattening resolves all included domains to their IP addresses at a point in time and writes them directly into your record as ip4:/ip6: entries, which cost zero lookups. This works until any vendor changes its IPs. At that point your flattened record becomes stale and SPF starts failing for that vendor’s mail. You must re-flatten and re-publish. Many teams set up a cron job. They all eventually miss an update.

ClearSPF keeps you under the limit

ClearSPF maintains a dynamically resolved flat record on your behalf. You publish one TXT record at the root and never touch SPF by hand again. ClearSPF checks each vendor’s IP ranges every 4 hours and updates the underlying record automatically. It keeps the record under the 10-lookup limit and tells you in the app if it ever goes over the limit.

How to check your current lookup count

Use the Tools page in ClearDMARC. The SPF analyser shows your current lookup depth, which mechanisms consume the most, and a projection of what adding common senders would cost. If you are over 10, the dashboard shows a PermError warning on your domain’s authentication health card.

Was this guide helpful?