Blog article

SPF limit overview:
The SPF limit is a hard protocol boundary, not a recommendation. An SPF record can only have 10 DNS-querying terms, and the rules require receivers to return a PermError when that limit is exceeded. The terms that count toward that total are include, a, mx, ptr, exists, and redirect.
Check your domain’s SPF, DMARC, and DNS configurations with our free record checker.
For most organizations, this problem builds slowly. A new marketing platform has been added. HR adopts a recruiting tool. Finance adds a billing system. Support starts sending from a help desk platform. Each change looks small. Over time, the SPF record becomes harder to manage, more difficult to audit, and increasingly likely to fail during evaluation.
That is why the SPF limit matters operationally. It can break authentication for legitimate email, create delivery risk, and force teams into reactive troubleshooting. The impact isn’t always an outright rejection. It depends on whether another authentication method passes in alignment with the domain’s DMARC policy, and how the receiving system handles the message.
SPF lets a domain owner specify which sources are authorized to send on its behalf. Receivers use the published SPF policy to check whether the sender is authorized.
The SPF limit is the maximum number of DNS lookups a receiving server can make during an evaluation. When a receiving email server checks your SPF record, it can’t make more than 10 DNS lookups. If the count goes over 10, the receiver must return a Permanent Error (PermError).
Not every SPF mechanism or modifier counts toward that total. The main terms that do count are:
includeamxptrexistsredirectThe terms all, ip4, and ip6 don’t count toward the 10-lookup limit because they don’t trigger DNS queries during an SPF evaluation. There are also extra sub-limits around mx and ptr, which is one reason complex records become fragile faster than teams expect.
In practical terms, the SPF limit is a protocol safeguard. It exists to prevent unreasonable query load. Once your policy grows beyond what the protocol allows, the result isn’t a degraded pass. It is a failure.
When SPF has too many DNS lookups, the receiving server returns a PermError. That means the receiver couldn’t correctly interpret the domain’s published SPF policy due to the protocol rules. A PermError is an error condition that requires DNS updates.
The downstream effect is more complex. DMARC doesn’t require both SPF and DKIM to pass. A DMARC pass can still happen if DKIM passes. So an SPF permerror does not automatically lead to a DMARC failure if DKIM still passes.
This is why the issue often surfaces as a delivery problem before it’s recognized as an SPF configuration issue.
Teams may first notice that:
includesThis is the most common cause. Each include points to another record. That is convenient when vendors have their own records, but the count adds up quickly. One business unit adds a platform. Another adds two more. Eventually, the record exceeds what the protocol allows.
Records also become risky when teams rely heavily on a, mx, exists, or redirect. These terms are valid, but they all contribute to the DNS lookup limit. A record may look short in DNS while still triggering too many lookups when it’s checked.
The visible record isn’t always the real problem. One include can point to another record with several more includes. On paper, your SPF record may appear manageable. In reality, the full lookup count may be well beyond the limit.
Old ticketing systems, retired campaign tools, and one-time projects often stay in SPF records long after the service is no longer used. The risk grows over time because unused entries still count when SPF is checked.
SPF often sits between teams. Marketing owns one sender. IT owns another. Support owns a third. Security reviews the policy only when something breaks. Without central ownership, the SPF record grows as a byproduct of procurement and operations.
Start with the real sender landscape. Document every platform, tool, vendor, and third-party service that sends emails using the domain. Include transactional systems, CRM tools, HR platforms, and finance services.
Do not optimize SPF before you know what systems must continue to work.
You need to count every DNS-querying term the receiving server evaluates during the SPF check. That also covers nested includes.
Focus on these mechanisms and modifiers:
includeamxptrexistsredirectIf the expanded count is at or above 10, you have an SPF limit problem.
This is often the fastest way to reduce your record. Retired systems, duplicate vendor entries, and temporary projects frequently remain in SPF records.
Confirm that each sender is still needed. If a platform no longer sends email, remove it. If multiple services are represented redundantly, consolidate where possible.
When you control the sending infrastructure, use stable, direct SPF entries instead of long chains of includes. Static ip4 and ip6 entries don’t consume the SPF lookup budget. They are often easier to use than third-party records.
This can reduce lookup count quickly and make the record easier to review.
Sometimes the right answer is separation, not compression. If marketing, support, and transactional emails are all sent from the same root domain, breaking out selected streams to aligned subdomains can reduce SPF complexity and improve ownership.
SPF flattening can reduce query count by replacing DNS lookups with resolved IP addresses. Used carefully, this is one of the most practical ways to stay within the SPF limit while preserving third-party sending.
Flattened records must be kept current as vendor infrastructure changes. A static flattening solution without ongoing updates can become stale and silently break authorization later.
After making changes, retest the record and validate the full lookup count again. Confirm that the policy stays within protocol limits and still authorizes every required sender.
This is also the point when teams should confirm that important email streams still pass DMARC after the SPF changes.
An SPF record can move from healthy to risky without any direct change in your own DNS. Vendors may update their own SPF records or add new includes. Because SPF counts lookups across all linked records, vendor-side changes can push you closer to the limit over time.
That is why periodic review matters. The job isn’t done just because the record is valid today. It is complete when the domain can absorb future changes without crossing the SPF limit.
Check your SPF posture before the next sender addition turns a manageable record into a delivery issue.
Sendmarc helps teams see SPF risk earlier and manage email authentication more consistently across their domains.
That matters because SPF issues rarely happen in isolation. A domain that‘s close to the SPF limit often also has poor sender visibility, inconsistent DKIM coverage, stale DNS records, or fragmented ownership across teams and vendors. If those issues are left unresolved, the same SPF problems often return.
Sendmarc helps teams manage SPF, DKIM, DMARC, BIMI, MTA-STS, and TLS-RPT records more consistently across their domains. That makes it easier to see where authentication risk is growing and which records are becoming too complex.
For teams dealing with SPF complexity specifically, Sendmarc’s SPF Flattening solution provides a practical way to reduce DNS-querying terms.
Get visibility into SPF risk, reduce manual troubleshooting, and keep critical email flowing as your sender footprint grows.