SPF too many DNS lookups: lookup count per part

Above 10 DNS lookups, receivers treat SPF as an error (permerror). We count your record's lookups per include and show where to cut.

Free, no sign-up no credit card public DNS records only Deutsch

How to get under 10

  • Remove old senders. A former newsletter tool or shop often stays in the record. Removing an include saves all lookups listed for it in the table.
  • Replace a and mx. If you send mail from fixed addresses, replace a and mx with ip4: or ip6: using those addresses. ip4 and ip6 cost no lookup.
  • Move tools to a subdomain. Many newsletter and invoicing services can send from news.your-domain or similar. Their SPF record then belongs to the subdomain and does not count for the main domain.
  • Careful with flattening. Replacing includes with their IP addresses lowers the count but breaks when the provider changes its addresses. This requires regular updates.

What the check counts

  • One record. Exactly one TXT record with v=spf1 on the domain. Two records count as none (permerror).
  • 10 DNS lookups. Each include, a, mx, ptr, exists and redirect costs one lookup, including nested includes. Above 10, SPF fails.
  • The ending. ~all marks other servers as suspicious, -all makes them fail; the receiver decides what happens to the mail. +all lets anyone send in your name.

All email records at once: email check. Single checks: DMARC check, SPF check, SPF lookup limit, MTA-STS check, DMARC generator.

Questions

What counts as a DNS lookup?

The parts include, a, mx, ptr, exists and the redirect modifier, once each, plus everything an include looks up itself (RFC 7208, section 4.6.4). ip4, ip6 and all cost nothing.

What happens above 10?

The receiving server stops the SPF check with permerror. That works like having no SPF: the mail fails SPF and relies on DKIM alone for DMARC.

What does “void lookup limit of 2 exceeded” mean?

A second limit: at most two lookups may return empty, for example an include pointing to a name without an SPF record. Usually that sender no longer exists. Removing it solves both problems.

Why does my provider show different numbers?

Providers change their includes; a record with 9 lookups today can have 11 tomorrow without changes on your side. Count again after every new sender and every now and then.