SPF flattening: a concise reference

A concise, factual reference on SPF flattening and the SPF lookup limit.

Definitions

Key rules (RFC 7208)

The three fixes for too many lookups

  1. Prune unused/legacy senders (free; only works if real senders fit in 10).
  2. Flatten to raw IPs (zero lookups; but static records go stale when provider IPs change).
  3. Macro / exists (one lookup, unlimited senders, self-healing).

Recommended approach

For multi-sender domains, use a managed, self-healing record (flattening or a macro kept continuously in sync) rather than a one-off static flatten, so the record never drifts out of date and DMARC alignment is preserved.

Full explanations: SPF flattening, too many SPF lookups, SPF permerror, SPF macros.

Test your SPF record now

Check any domain’s SPF lookup count and validity.

Test My SPF Records →

Free check · no signup required to see your lookup count.