Skip to content

Fixing the SPF 10-DNS-lookup limit: a practical guide

SPF allows exactly ten DNS lookups per evaluation. Lookup eleven turns your entire record into a permerror — receivers act as if you had no SPF at all, and DMARC alignment fails with it. It is the most common critical finding on business domains, and the fix is usually 20 minutes of cleanup.

Counting correctly

Every include:, a, mx, ptr, exists and redirect= mechanism costs one lookup — including those inside nested includes. ip4: and ip6: cost nothing. So v=spf1 include:_spf.google.com include:sendgrid.net mx ~all looks like three lookups, but each include's own subtree adds its lookups to yours. You cannot audit this from the record text alone; you need the resolved tree — our free SPF Surveyor draws it with a per-branch counter.

Three fixes that work

1. Delete dead weight. Records accumulate includes for tools cancelled years ago. Every include you can delete is a lookup back, and typically a third of the includes we see are unused.

2. Flatten stable providers. Replace includes of services with static, published ranges by their ip4:/ip6: values directly. Only do this for providers documenting stable ranges — never flatten Microsoft 365 or Google by hand, their ranges rotate.

3. Move marketing to a subdomain. Let the newsletter tool send from news.yourdomain.dk with its own SPF record and its own 10-lookup budget. Alignment still works in relaxed mode, and your root record shrinks.

What NOT to do

Don't create a second SPF record (two records = instant permerror; merge into one). Don't use +all to "make the errors stop". And be careful with automated one-click flattening services: they must re-resolve continuously or your record silently drifts out of date when a provider rotates IPs. If you flatten manually, monitor your senders — MonitorBase re-resolves your tree on every check (daily from the Basic plan, weekly on Free) and warns when you get close to the limit.

Free tools that help

  • SPF Surveyor: Visualize the full SPF include tree and count DNS lookups against the limit of 10.

All guides

Check your domain now — free

Run the health check