SPF PermError: too many DNS lookups
SPF only allows 10 DNS lookups. Go over and receivers stop checking and treat SPF as broken for every message you send.
What the error means
When a receiving server checks your SPF record it has to look up every include:, a, mx, exists and redirect=, plus the ones inside each include. The SPF standard (RFC 7208) caps that at 10. On lookup 11 the check stops with a PermError ("permanent error").
A PermError isn't a pass. With DMARC in place, that mail now relies entirely on DKIM. Without DKIM, it fails DMARC and may be junked or rejected.
Check your count
Run your domain through the SPF checker. It follows every include and shows the total, plus a tree of where the lookups come from.
How it usually happens
Microsoft 365 alone uses 2. Add Mailchimp, a CRM, a helpdesk, Xero invoices and a website form plugin, each with its own include, and you can pass 10 without noticing. Old includes for services you cancelled years ago are the most common waste.
Four ways to fix it
- Remove includes you don't need. Ask "does this service still send as our domain?" for each one.
- Swap
aandmxfor IP addresses.ip4:andip6:entries cost no lookups. - Send bulk mail from a subdomain. Put newsletters on
news.yourdomain.comwith its own SPF record. Each subdomain gets its own 10. - Rely on DKIM for services that sign properly. Some platforms sign with your domain via DKIM. If DKIM aligns, DMARC passes without that service being in SPF.
"SPF flattening" (replacing includes with the provider's IPs) works, but only if something keeps it up to date. Providers change IPs and a stale flattened record silently breaks.
Common questions
Does ip4 count as a DNS lookup?
No. ip4, ip6 and all cost nothing. Only include, a, mx, ptr, exists and redirect count.
Will a PermError stop all my email?
Not always, but SPF will fail for every message. With DMARC, mail then depends on DKIM passing.