← All guides

Practical guide · October 17, 2026

SPF DNS lookup limit: how to diagnose it without breaking the record

Learn what counts as a DNS lookup during SPF evaluation, why nested includes matter, and how to reduce complexity without removing legitimate senders.

What is limited

SPF authorizes hosts for identities used during email transport. When evaluating a record, several mechanisms and modifiers can cause DNS lookups, including include, a, mx, exists, and redirect. SPF defines an operational limit of ten DNS-query-causing terms during an evaluation; it is not simply a count of the visible words in the TXT record.

Includes can hide most of that complexity. A short record with several include mechanisms can expand into more lookups when each reference is followed. The result may be permerror, so some receivers cannot determine correctly whether a sender is authorized.

Finding the cause

Start with the TXT record published at the exact domain name used by the SPF identity being evaluated. Then expand each include reference and count the lookups caused by included records too. Check for more than one record starting with v=spf1 at the same name: publishing multiple SPF records is not a valid way to divide senders.

Do not confuse DNS lookups with the number of IP addresses. An ip4 or ip6 mechanism written directly does not itself cause an additional DNS lookup, while mechanisms such as mx or a do. Use an analyzer that shows the dependency tree and manually review the providers it finds.

Reducing lookups safely

First remove or update services that no longer send mail for the domain. Then ask each provider for its recommended method: some support direct IP ranges, some require include, and others allow separate subdomains for different streams. Do not remove a dependency just because it looks redundant; it may belong to an active system.

Avoid permanently copying third-party SPF IPs without a maintenance process. If the provider changes its ranges, your copy may become stale and block legitimate mail. Also avoid creating multiple SPF records to get around the limit; the result is invalid.

Before and after the change

Document which system uses each mechanism, test real messages from every service, and verify the TXT record again after publishing. Observe DMARC reports and authentication results received by test recipients. Change one part at a time and keep the previous value so you can roll back quickly.

An SPF checker helps inspect the public record, but it does not know every sender your organization has contracted or certify deliverability at all receivers. The sender inventory and operational testing remain the domain administrator’s responsibility.