emailsecuritygrade.com

SPF Too Many DNS Lookups: How to Fix the 10-Lookup PermError

October 22, 2026

Your SPF record broke because it's making more than 10 DNS lookups, and RFC 7208 caps that at exactly 10. Go over, and the receiving mail server returns a permerror — it stops evaluating your SPF record entirely and treats it as broken, even if the sending server was actually authorized. This usually shows up after you've added a few too many email tools (CRM, help desk, marketing platform, forwarding service) each with their own include: statement.

Key facts

  • RFC 7208 section 4.6.4 caps SPF evaluation at 10 total DNS-querying mechanisms per check — not 10 lines in your record, 10 actual lookups once everything resolves.
  • include, a, mx, ptr, exists, and the redirect modifier each count toward the limit; ip4, ip6, all, and qualifier symbols (+ - ~ ?) do not.
  • Includes are recursive — a single include:_spf.google.com can cost 4+ lookups once its own nested includes are counted, so 4-5 includes on your record can easily exceed 10.
  • The mx mechanism has its own internal sub-limit: it must not trigger more than 10 address lookups on its own, or it returns permerror independently of your total count.
  • Exceeding the limit returns permerror, which most receivers treat as an SPF failure — and because DMARC needs SPF or DKIM to pass for alignment, this can drag your DMARC result down with it.

How to count your own SPF lookups

Pull your SPF record and count every include, a, mx, ptr, exists, and redirect — then repeat for each domain an include points to, because the count is cumulative across the whole recursive chain, not just your top-level record.

Example: a record with four includes can look fine on the surface but fail in practice:

v=spf1 include:_spf.google.com include:spf.protection.outlook.com include:mailgun.org include:_spf.salesforce.com ~all
  • _spf.google.com alone resolves to 4 lookups (it includes three netblock subdomains)
  • spf.protection.outlook.com adds another
  • mailgun.org and _spf.salesforce.com each add at least one

That's 7+ lookups from four includes before you've added your own mail server, a transactional email tool, or a forwarding service. Add one more ESP and you're over the line.

A free scan at emailsecuritygrade.com resolves your SPF record's full lookup chain and flags whether you're over the limit, instead of making you count it by hand.

How to fix too many DNS lookups

  1. Audit what's actually sending mail on your domain. Old marketing tools, a help desk you stopped using, a forwarding rule from years ago — if nothing is sending through it anymore, remove its include.
  2. Swap includes for direct IP ranges where you can. If a provider publishes static sending IPs, ip4: and ip6: mechanisms don't count toward the limit at all. This only works if the provider's IPs are genuinely static — check their docs before hardcoding anything.
  3. Flatten nested includes you control. If you manage the included record, replacing its own includes with the resolved IP ranges removes one layer of recursive lookups. This needs upkeep if the underlying provider's IPs change.
  4. Consolidate senders onto fewer platforms where it makes sense, rather than running five tools that each need their own include.
  5. Lean on DKIM alignment for services that support it. DMARC only needs SPF or DKIM to pass for alignment — if a sending service signs with its own DKIM key aligned to your domain, you don't strictly need it in your SPF record for DMARC purposes (though some receivers still soft-check SPF independently).

Fix the record, then re-run the scan to confirm the lookup count is back under 10 before you move on.

Check your grade free

Don't guess what's broken — see it. Scan your domain free at emailsecuritygrade.com and get an instant A-F grade on your SPF, DKIM, DMARC, and MX records, with a plain-language fix for anything failing. No signup, no install — it runs in your browser.

If your emails are still landing in spam after fixing the records, a deliverability tool like InboxAlly can train mailbox providers to trust your sending — worth a look once your grade is solid.

Fixed your records? Now fix deliverability.

Correcting SPF, DKIM, and DMARC is step one — but inbox providers don't trust a domain overnight. InboxAlly trains Gmail, Outlook, and Yahoo to trust your sending domain by generating real engagement signals, so your emails stop landing in spam within weeks instead of months. Most users see open rates double in 2–4 weeks.

Start free with InboxAlly →