MailAuth Tools

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

  1. Remove includes you don't need. Ask "does this service still send as our domain?" for each one.
  2. Swap a and mx for IP addresses. ip4: and ip6: entries cost no lookups.
  3. Send bulk mail from a subdomain. Put newsletters on news.yourdomain.com with its own SPF record. Each subdomain gets its own 10.
  4. 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.

Would you rather someone just fixed it? I'm an IT engineer in Sydney with 9 years of Microsoft 365 work. I'll set up SPF, DKIM and DMARC properly for your domain and send you a plain-English report. See the fixed-price service on Fiverr.
Checking lots of domains? There's a bulk checker on Apify that grades hundreds at once.

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.

Free checks