On this page
SPF 10-Lookup Limit Exceeded
Exceeding the RFC 7208 10-lookup limit triggers instant SPF PermError bounces. Learn why it happens, how lookups nest, and safe ways to flatten your DNS.
Check your exact recursive DNS lookup count right now with our Free Email Deliverability Scanner.
The physics of the 10-lookup ceiling
Your SPF record isn't just a passive list—it is a set of live DNS instructions. Every time you add a vendor (such as include:spf.protection.outlook.com, include:sendgrid.net, or include:_spf.salesforce.com), the receiving server queries that vendor's DNS, plus any nested include or exists mechanisms hidden underneath it.
To prevent infinite loops and DNS denial-of-service amplification, RFC 7208 enforces a hard maximum of 10 DNS lookups per SPF check. Once your tree reaches 11 lookups, Gmail and Microsoft 365 stop evaluating and return a fatal PermError.
An SPF record that requires 11 lookups provides the exact same authentication protection as having no SPF record at all. Worse, retired SaaS tools left inside old TXT records quietly eat lookups for years—and a vendor adding one extra nested include on their side can push a 10-lookup domain over the cliff overnight.
What counts toward the 10-lookup limit (and what doesn't)
Only mechanisms that force a receiving mail server to perform DNS queries count against your 10-lookup budget. Raw IP literals (ip4:, ip6:) and the terminating all qualifier cost zero lookups:
| Mechanism / Vendor Include | Live DNS Lookups | Engineering Notes |
|---|---|---|
ip4:203.0.113.0/24 · ip6:... · -all |
0 |
Evaluated locally with zero DNS queries—ideal for static on-prem relays. |
include:spf.protection.outlook.com |
1 |
Microsoft 365 Exchange Online—flat IP list with 0 nested lookups. |
include:_spf.google.com |
1 |
Google Workspace—Google flattened its former _netblocks* tree into a flat IP list (0 nested lookups). |
include:servers.mcsv.net (Mailchimp) |
1 |
Flat IP list (0 nested lookups). Often unnecessary on your root domain—Mailchimp sends envelope mail from its own bounce domain unless custom return-path is configured. |
include:amazonses.com |
1 |
Amazon SES—flat IP list with 0 nested lookups. |
include:mail.zendesk.com |
1 |
Zendesk Support—flat IP list with 0 nested lookups. |
include:spf.mandrillapp.com |
1 |
Mailchimp Transactional (Mandrill)—flat IP list with 0 nested lookups. |
include:sendgrid.net |
2 |
1 for include:sendgrid.net + 1 nested include:ab.sendgrid.net. |
include:_spf.salesforce.com |
2 |
1 for include:_spf.salesforce.com + 1 nested exists:%{i}._spf.mta.salesforce.com. |
mx |
1 |
Counts as 1 lookup toward RFC 7208 Section 4.6.4's 10-lookup ceiling (RFC 7208 Section 4.6.4 also applies a separate 10-hostname per-mechanism A/AAAA resolution cap on mx, distinct from the 10-lookup limit). Still redundant on Microsoft 365 or Google Workspace since outbound mail comes from vendor include: pools, not inbound MX hosts. |
a · exists · ptr · redirect= |
1 (1+ for redirect=) |
Each mechanism adds 1 lookup toward the 10-lookup limit (redirect= also adds any nested lookups inside its target domain; ptr is deprecated by RFC 7208 Section 5.5). |
Verify live before publishing: The vendor totals above reflect live DNS verification (1 lookup for the include itself plus any nested lookups inside it). Mail and SaaS providers occasionally flatten or restructure their SPF trees over time, so always confirm your domain's exact live lookup count with our Email Deliverability Auditor.
Real before & after: trimming a 12-lookup PermError record to 2
Consider a common growing-business SPF record that accumulated redundant mechanisms, a retired Google Workspace include, and multiple CRM, marketing, transactional, and helpdesk platforms on the root domain—crossing 12 live DNS lookups:
; BLOATED — 1 (a) + 1 (mx) + 1 (outlook) + 2 (sendgrid) + 2 (salesforce) ; + 1 (amazonses) + 1 (mcsv) + 1 (zendesk) + 1 (mandrill) + 1 (google) = 12 lookups @ 300 IN TXT "v=spf1 a mx include:spf.protection.outlook.com include:sendgrid.net include:_spf.salesforce.com include:amazonses.com include:servers.mcsv.net include:mail.zendesk.com include:spf.mandrillapp.com include:_spf.google.com ~all"
By removing the retired Google Workspace include (1 lookup), stripping unnecessary a and mx mechanisms (1 lookup each), and delegating bulk marketing, CRM, transactional, and ticketing tools to dedicated subdomains (mail.yourdomain.com, crm.yourdomain.com, and support.yourdomain.com), the root record drops from 12 lookups to 2 lookups—leaving 8 lookups of headroom:
; Root domain (2 lookups total: 1 outlook + 1 amazonses — 8 lookups of headroom) @ 300 IN TXT "v=spf1 include:spf.protection.outlook.com include:amazonses.com -all" ; Dedicated marketing, CRM & ticketing subdomains (independent 10-lookup budgets) mail 300 IN TXT "v=spf1 include:servers.mcsv.net include:spf.mandrillapp.com -all" crm 300 IN TXT "v=spf1 include:_spf.salesforce.com include:sendgrid.net -all" support 300 IN TXT "v=spf1 include:mail.zendesk.com -all"
Three safe ways to stay under 10 lookups
- Prune dead vendors & redundant mechanismsRemove
a,mx, andptrmechanisms if your web server does not send email, and strip retired CRM, registrar (secureserver.net), or newsletter includes. Also check whether vendors like Mailchimp or Constant Contact even need a root SPF include (many rely on DKIM alignment and their own bounce envelope domain). - Delegate bulk & transactional mail to subdomainsMove Mailchimp, SendGrid, HubSpot, and billing alerts to dedicated subdomains (
mail./alerts.), each carrying its own 10-lookup budget and isolated IP reputation. - Use managed SPF flattening carefullyNever hand-copy vendor IP ranges into static
ip4:blocks—cloud providers rotate IPs regularly and manual copies break silently. Use automated dynamic flattening or clean subdomain architecture instead.
How to trace nested lookups with dig & nslookup
You can audit nested depth directly from any terminal by inspecting your root TXT record and recursively expanding each include::
# macOS / Linux — check root, then inspect vendor records for nested mechanisms dig +short TXT yourdomain.com dig +short TXT sendgrid.net dig +short TXT _spf.salesforce.com # Windows PowerShell / CMD nslookup -type=txt yourdomain.com nslookup -type=txt sendgrid.net
Provider-specific DNS & flattening notes
- Microsoft 365: Never pair
mxwithinclude:spf.protection.outlook.com—Exchange Online sends from dedicated outbound pools covered by the include (1 lookup), not from inbound MX endpoints, so addingmxburns an extra lookup needlessly. - Google Workspace & Multi-Lookup SaaS Vendors: Although
include:_spf.google.comcurrently resolves in 1 lookup (flattened IP list), multi-lookup platforms such asinclude:sendgrid.net(2 lookups) andinclude:_spf.salesforce.com(2 lookups) carry nested queries—and any vendor can add nested includes without warning. Aim to keep your root record at ≤ 7–8 lookups total so an upstream vendor change never trips the 10-lookup ceiling overnight. - Cloudflare & GoDaddy: Avoid manually flattening Microsoft 365 or Salesforce CIDR lists into huge static TXT records inside Cloudflare or GoDaddy. Beyond stale-IP bounces when vendors rotate pools, oversized TXT responses can exceed the 512-byte UDP DNS packet guideline and force TCP retries on older mail relays.
One stray character in SPF or DMARC can bounce every invoice your company sends. Let Enuclea audit your senders, flatten SPF safely, align 2048-bit DKIM, and configure DMARC cleanly starting at $250 flat. Test your domain free, book a 15-minute call (24-hr notice) ↗, or call (703) 239-4620.