Why the 10-Lookup Limit Exists
The SPF specification (RFC 7208) limits SPF evaluation to 10 DNS lookups to prevent denial-of-service attacks where an attacker crafts an SPF record that causes the evaluating server to make hundreds of recursive DNS queries.
Each include:, a:, mx:, exists:, and redirect= mechanism in your SPF record counts as one lookup — and each included record may itself contain further includes, each of which also counts. The limit applies to the total chain, not just your top-level record.
How to Tell If You've Hit the Limit
Your DMARC aggregate reports will show SPF failures from your own sending infrastructure — sources that should be passing. The specific error is SPF PermError (Permanent Error), which receiving servers typically treat as a failure.
You can test your SPF record with an SPF analyzer tool. Count the include: mechanisms in your record and trace how many DNS queries each one triggers transitively.
A typical organization hitting this limit has accumulated includes over time: one for Google Workspace, one for Microsoft 365, one for Salesforce, one for Mailchimp, one for HubSpot, one for a transactional email service, and so on. Each SaaS tool that sends email from your domain adds an include, and many of those includes themselves contain more includes.
Counting Your Lookups
The mechanisms that consume lookups:
include:spf.example.com— 1 lookup, plus however many lookupsspf.example.comitself requiresa:mail.example.com— 1 lookupmx:example.com— 1 lookupexists:%{i}._spf.example.com— 1 lookupredirect=spf.example.com— 1 lookup
Mechanisms that do not consume lookups:
ip4:192.168.1.0/24— 0 lookups (a direct IP range)ip6:2001:db8::/32— 0 lookupsall— 0 lookups (the catch-all at the end)
Solution 1: Remove Unused Includes
Before anything else, audit your SPF record against your current sending infrastructure. Remove any include: entries for services that no longer send email from your domain. This is the easiest fix and has no ongoing maintenance burden.
Compare your SPF includes against your DMARC aggregate report data. If a provider's IP range isn't appearing in your reports, that service probably isn't sending from your domain and the include can be removed.
Solution 2: SPF Flattening
SPF flattening replaces include: mechanisms with the actual IP addresses they resolve to. Since direct ip4: and ip6: entries require zero DNS lookups, flattening can dramatically reduce your lookup count.
For example, instead of:
include:_spf.google.com include:spf.protection.outlook.com include:_spf.salesforce.com
A flattened record uses the resolved IP ranges directly:
ip4:209.85.128.0/17 ip4:74.125.0.0/16 ip4:40.92.0.0/15 ip4:40.107.0.0/16 ...
The tradeoff: When a provider changes their sending IP ranges (which happens), your flattened record becomes out of date and their email starts failing. You must monitor for changes and update the record promptly. This maintenance burden is why many organizations use an automated SPF flattening service rather than doing it manually.
Solution 3: Restructure Your Record
If some providers share sending infrastructure (for example, multiple Microsoft products all route through spf.protection.outlook.com), consolidate duplicate includes. Having the same include listed twice is a common mistake that wastes a lookup.
Also check whether any of your includes already encompass another. If include:provider-a.com itself contains include:shared-infrastructure.com and you also have include:shared-infrastructure.com directly, you are double-counting.
The 255-Character Limit
Separately from the lookup limit, a single DNS TXT record string cannot exceed 255 characters. SPF records longer than this must be split into multiple strings within the same TXT record. Most DNS management interfaces handle this automatically, but it is worth checking if your record is very long.
Also note that you must have exactly one SPF TXT record per domain. Having two v=spf1 records causes a PermError regardless of their content.
See SPF and DKIM Status in Your Reports
Your DMARC Exposed shows you exactly which senders are failing SPF — and whether the lookups are the cause — without manually parsing XML reports.
Start Your Free Trial Check Your DMARC RecordFrequently Asked Questions
What is the SPF 10 DNS lookup limit?
The SPF specification (RFC 7208) limits the number of DNS lookups made during SPF evaluation to 10. This includes lookups triggered by include:, a:, mx:, exists:, and redirect= mechanisms — and each included record's own lookups also count. Exceeding the limit returns PermError, causing SPF to fail.
What is SPF PermError?
SPF PermError (Permanent Error) is returned when SPF evaluation encounters an error that cannot be retried — most commonly exceeding the 10 DNS lookup limit, or having two SPF records on the same domain. Most receivers treat PermError as a failure, which affects DMARC authentication for that message.
Does DKIM help if SPF is failing?
Yes — DMARC requires either SPF or DKIM to pass with alignment, not both. If your SPF record is hitting the lookup limit and failing, but your sending sources are correctly configured for DKIM, your DMARC authentication can still pass. This is one reason why DKIM is generally considered the more reliable authentication mechanism for DMARC purposes.