1. Home
  2. Glossary
  3. SPF flattening

Authentication and DNS

What is SPF flattening?

SPF flattening replaces include mechanisms with the IP ranges they resolve to, so a record stays under SPF's ten-DNS-lookup limit. It works because ip4 and ip6 mechanisms cost no lookup, but it moves the job of tracking your providers' IP changes onto you.

Each include, a, mx, ptr and exists mechanism costs one of the ten permitted lookups, and nested includes count too. Exceeding ten makes the whole record fail with a permanent error.

Flattening trades a lookup problem for a maintenance problem. Providers change their sending ranges, and a flattened record that has gone stale silently fails authentication for mail that should pass. A hand-flattened record needs regular checking; a managed flattening service keeps it current for a fee.

Try the simpler fixes first: remove vendors you no longer send through, and authorise your own servers by IP rather than by include. Flatten only when the record genuinely cannot fit.

Example

include:_spf.example-esp.com becomes ip4:198.51.100.0/24 ip4:203.0.113.0/24, which costs no lookups but goes stale if the provider adds a range.

Go deeper

Sources

By SimpleVerifier Team · Last reviewed 2026-10-13 · All 50 glossary terms

Clean your next list before it bounces

100 free email checks when you sign in with Google, no card. Then monthly plans from $9, or one flat price with fair use, never cut off.

100 free checks, no card Cancel anytime Secure payment by Stripe