SPF "too many DNS lookups": over the limit of 10

More than 10 includes and lookups: SPF fails for every message.

Validate an SPF record.

The 10-lookup limit

To protect receivers, the SPF standard (RFC 7208) allows at most 10 DNS lookups while evaluating a record. Every include:, a, mx, ptr, exists and redirect= counts, including the ones inside the records you include. Above 10, the result is PermError for every message, which is the same as having no SPF. ip4:, ip6: and all do not count.

Why it happens

Each email service you add asks for its own include: Google Workspace or Microsoft 365, a newsletter tool, a CRM, a help desk, an invoicing app… Some of them include others in turn. Five or six services are often enough to go over the limit. There is a second limit: more than 2 lookups that return nothing ("void lookups") also fail.

How to get back under 10

  1. Check your domain with the SPF checker above: it counts every lookup and shows which include uses how many.
  2. Remove services you no longer use. This is the most common fix.
  3. Replace a and mx with the actual ip4: addresses of your server if they rarely change.
  4. Move a sender to a subdomain (for example news.example.com for newsletters) with its own SPF record: each subdomain has its own 10 lookups.
  5. As a last resort, "flatten" an include into its IP ranges. It saves lookups, but you must update it whenever the provider changes its IPs.

The SPF generator shows the lookup count while you choose providers, so you can see the total before you publish.

Related errors

Last updated: