Knowledge Base

SPF too many DNS lookups: find the evaluation path before changing it

An SPF "too many DNS lookups" error commonly refers to the limit of ten DNS-dependent terms evaluated during an SPF check, including reached nested includes and redirects. It is not simply a count of DNS packets or entries in a record. Identify the actual sender and evaluation path, distinguish permerror from temporary DNS failure, then make a provider-supported change without removing legitimate senders.

Understand exactly what the SPF limit counts

RFC 7208 limits the number of evaluated terms that cause DNS queries: include, a, mx, ptr, exists and redirect. The count includes terms reached recursively while evaluating includes and redirects. Mechanisms such as ip4, ip6 and all do not consume this particular DNS-dependent term budget. They still need correct syntax and an appropriate place in the record.

An include is not necessarily one lookup for the whole assessment: its nested policy can introduce more counted terms. Conversely, evaluation may stop when a mechanism matches, so a branch not reached on that path is not evaluated for that message. DNS caching or a tool's packet count is not a reliable substitute for this protocol term count. Other DNS-related limits can also matter and should not be confused with this one.

Separate the error label from the diagnosis

Collect the SPF identity, sending IP, observed result, receiver and time. Exceeding the evaluated-term limit produces permerror under the SPF specification. A temporary DNS problem can produce temperror and calls for a different investigation. A syntax error or multiple applicable SPF records can also prevent a valid policy result without being the same nested-lookup problem.

A generic DNS checker may calculate a possible branch or report its own interpretation. Compare that output with the actual receiving system's result for a known sending route. If tools disagree, preserve the policy snapshot and evaluation assumptions rather than repeatedly editing DNS until one dashboard turns green.

SPF evidence and the question it answers
EvidenceQuestionImportant limit
Sending IP and evaluated identityWhich SPF policy applies to this message?The visible From domain alone may not identify that policy.
Reached include or redirect chainWhich DNS-dependent terms were evaluated?Nested terms count; an unreached branch is different.
permerrorWas a permanent policy problem encountered?It does not identify the cause without details.
temperrorDid a temporary problem prevent completion?It is not automatically a lookup-budget failure.
DNS record visible after editingHas this resolver observed the new value?It does not establish successful delivery from every sender.

Build an authorized-sender inventory before pruning

List staff mail, forms, invoicing, ticketing, marketing and other active platforms. Identify the owner and provider instructions for each. A domain may accumulate includes from past vendors, but an unfamiliar include is not automatically unused. Confirm retirement with the business and provider before removing it.

SPF evaluates the relevant envelope identity; it is not a list of every platform that displays your domain in a From address. Determine how each provider sends and authenticates the affected mail. DKIM and DMARC alignment are related checks, not permission to treat SPF errors as irrelevant or to authorize unknown servers.

Trace the evaluation path with a concrete worksheet

For the affected route, record the evaluated identity and policy snapshot, then walk the mechanisms in order. Expand includes reached during evaluation and note a redirect only if evaluation reaches it. Track the counted terms and the reason evaluation stops. Use a suitable SPF evaluator or technical review with the same inputs rather than guessing from the number of includes visible in the top-level text.

Keep provider domains and IPs exactly as documented during the review; do not replace them with an invented production record. The worksheet is a reasoning aid, not a new DNS value to publish. It should distinguish the observed path from another possible sender path that may reach more nested terms.

Prefer supported simplification over a fragile shortcut

Possible actions include retiring a confirmed unused source, correcting redundant or obsolete configuration, or using a provider-supported arrangement for separate sending identities. The right choice depends on the business route and domain alignment. A subdomain is not a universal fix: it changes identities and needs its own complete configuration and tests.

Manual flattening replaces dependencies with IP mechanisms and can become stale when a provider changes infrastructure. Do not present it as a maintenance-free fix. If a supported service or architecture is used, agree update ownership and failure handling. Never solve the symptom by authorizing all senders or publishing multiple competing SPF records.

Verify the change at DNS and message level

Record the original values and the intended replacement, change owner and rollback condition. Allow for resolver visibility and TTL behavior, then evaluate the affected policy with the relevant sending inputs. Send controlled messages from each retained business source and inspect trusted receiver results, including the relevant authentication identities.

A corrected SPF result does not guarantee inbox placement or prove that DKIM and DMARC are configured as intended. Separate those acceptance checks. If one source remains uncertain, document it rather than declare the entire domain resolved. Preserve the comparison so a future provider change can be investigated against a known configuration.

When to ask for a scoped review

Escalate when there are several owners, undocumented includes, conflicting tools or important business messages failing after a change. Provide the domain, sending platform, error and approximate time. Do not share DNS-account passwords or mail credentials in the enquiry. An authorized review can define what access and evidence are needed.

CyberFixCrew is an Israeli cybersecurity company serving businesses worldwide with business email and digital-infrastructure work. We connect the technical diagnosis to the actual sending sources, provider-supported configuration and recorded tests. The goal is a maintainable policy and a clear handover, not simply a lower number in a checker.

Further reading: RFC 7208: SPF and DNS lookup limitsFurther reading: Microsoft 365: SPF configuration and authorized sendersFurther reading: RFC 8601: Authentication-Results and trust boundaries

Practical answers

Questions about this topic

Does the limit mean ten DNS records or ten packets?

No, this limit concerns evaluated DNS-dependent terms defined by SPF, including reached recursive dependencies. Actual DNS traffic or a simple record count is a different measure.

Can I add another SPF record to get more room?

No, multiple applicable SPF records are a policy error, not an additional budget, so consolidate the intended policy using the relevant provider guidance.

Is flattening always the best solution?

No, replacing provider dependencies with IPs can become stale. First confirm active senders and supported simplifications, and define maintenance if an IP-based arrangement is chosen.

LET US DISCUSS YOUR TASK

Map the SPF error to the actual business sender

Share the domain, sending provider and observed error. Keep account credentials and private message content out of the enquiry.

Discuss an SPF configuration review