Guides / DNS and authentication

SPF DNS lookup limits: diagnose the evaluated policy

EmailValidly · Updated September 6, 2026 · 2 minute read

An SPF policy can become difficult to maintain as more sending services are added. Counting the visible include statements is not enough to understand its evaluation. Nested policies and the actual matching path matter, and a plain TXT lookup cannot certify the whole result.

Open the relevant free tool →

Count DNS-causing terms, including recursion

01include / a / mxCan require DNS lookups
02ip4 / ip6 / allNo DNS lookup for the term
03NESTED includeAdds to evaluation cost
A top-level count is a preliminary check. A full SPF evaluation must follow nested policies and protocol rules.

Understand the relevant limit

SPF limits DNS-query-causing terms during evaluation, including lookups reached through mechanisms like include and redirect. The commonly discussed limit is ten. This is not simply a count of every DNS packet, and a short top-level record can still expand into more work through nested policies. Consult the specification and an evaluator when diagnosing a limit failure.

Inventory legitimate senders

List every service that currently sends using the domain’s SPF-relevant identity. Separate active services from old integrations. Keep an owner and purpose for each addition so the record does not accumulate unexplained includes. Removing an obsolete sender should follow a confirmed inventory, not a guess based on an unfamiliar hostname.

Inspect the actual record set

Check that the intended domain publishes the policy you expect and look for duplicate SPF records. A present record is only the beginning of diagnosis. Preserve the complete policy text and the time of the lookup. If a tool only displays TXT records, do not interpret its presence badge as proof that nested evaluation stays within limits.

Avoid blind flattening

Replacing provider includes with copied IP addresses can create maintenance work when providers update their ranges. Do not make that substitution without an update process and an checking of the provider’s guidance. Prefer simplifying obsolete configuration and using the sending architecture recommended for your services. Keep changes reviewable and test the legitimate paths afterward.

Validate with real sending evidence

After a update, inspect authentication results from controlled messages sent through each intended service. Keep envelope identity and visible From separate in your analysis. A policy can be syntactically plausible yet fail for a particular sending path. If a message still fails, use its detailed result and the provider’s documentation to narrow the cause rather than repeatedly adding broad permissions.

Technical references

SPF evaluation limits in RFC 7208

Continue reading