Email

SPF PermError: "too many DNS lookups"

In short. Your SPF record reads as valid, but checking it forces a server to make more than 10 DNS lookups. Beyond that the result is "permerror": SPF fails for all your messages. The cause is almost always a pile-up of include: entries for sending services. You fix it by removing or consolidating mechanisms in your DNS zone.

RFC 7208 (section 4.6.4) requires servers to limit to 10 the number of terms that cause a DNS lookup during evaluation: the include, a, mx, ptr and exists mechanisms and the redirect modifier. The ip4, ip6 and all mechanisms do not count. Going over the limit gives "permerror".

Last verified: November 27, 2026, against RFC 7208 (sections 3.2 and 4.6.4) and Zoho Mail's help.

How to fix it

  1. Count your lookups. Each include, a, mx, ptr, exists and redirect counts as one, and includes nested inside a provider's SPF count too, because the limit applies to the whole evaluation. Read your record with nslookup -type=TXT your-domain.com, then those of each include.
  2. Remove services you no longer use: an old newsletter tool, an old invoicing tool, an old host. Every unnecessary include: uses a lookup.
  3. Watch mx and a. Each MX queried counts, and the RFC also limits the address (A or AAAA) records queried per MX to 10: beyond that it is also a permerror. Replace them with ip4: or ip6: only if the address is fixed and yours.
  4. Replace an include with ip4 / ip6 ranges with care. They do not count toward the limit, but a provider may change its addresses: a range frozen by hand will have to be updated whenever they change.
  5. Avoid lookups that return nothing. The RFC recommends limiting "void" lookups (zero answers or NXDOMAIN) to 2; beyond that it is a permerror. An include pointing to a name that no longer exists is one.
  6. Keep a single SPF record. Two SPF records on the same name also give a permerror (RFC 7208, section 3.2): merge them. Zoho Mail says the same: a domain has only one SPF record and you must stay under 10 lookups.
  7. Wait for DNS propagation, then run the check again.

Why this matters for DMARC

If SPF is in permerror, it no longer passes. DMARC then passes only if DKIM passes with your own domain. Fix SPF quickly, and check that DKIM really signs your messages.

Services that send with their own subdomain

In practice SPF is evaluated on the domain of the envelope address (Return-Path): a service set up to send with a subdomain has its own SPF record and its own limit of 10. This is common practice that RFC 7208 does not detail in the passages we read; check it in the service's help.

Free tool. SPF checker

Check your domain for free. AttackScout reads your public SPF, DKIM and DMARC records and tells you what to change. Run the free check

Frequently asked questions

Do ip4 and ip6 count?

No. RFC 7208 excludes all, ip4 and ip6 from the limit of 10.

Is the result always a failure?

Yes: RFC 7208 says that exceeding the limit gives "permerror", and the recipient then treats SPF as invalid.

Sources

Accessed on 11/27/2026.

Get the free alerts