Skip to content

SPF Flattener

Resolve every include:, a:, and mx: mechanism into raw IP addresses so your record stays within the 10 DNS lookup limit.

What SPF flattening does

Every third-party mail service you add to an SPF record via include:costs at least one DNS lookup, and each of those includes can itself contain more includes. SPF caps evaluation at 10 total lookups — go over, and receivers treat the entire record as a permanent error, which means none of your mail authenticates, not just the overflow. Flattening walks the whole include chain, resolves it down to the underlying IP ranges, and rewrites the record as a flat list of ip4:and ip6: entries that cost zero lookups.

How to use the flattened record

Replace your existing root-domain SPF TXT record with the flattened version shown above — don't add it alongside the original, since only one SPF record per domain is evaluated. Because a flattened record is a point-in-time snapshot of IP ranges rather than a live reference to the provider's infrastructure, re-run this tool and republish whenever a sending provider changes their ranges, or use DMARC.WS monitoring to get alerted automatically.

Common mistakes

  • Treating a flattened record as permanent. Providers like Google, Microsoft, and SendGrid rotate IP ranges without notice — a stale flattened record silently breaks deliverability months later.
  • Flattening when you're nowhere near the 10-lookup limit. Flattening trades lookup count for a longer, harder-to-read record that needs manual upkeep — only worth it once you're actually over or close to the limit.
  • Forgetting to keep the original record's catch-all qualifier consistent in the flattened version.

Keep an eye on this automatically

A one-off check tells you how things look right now. DMARC.WS collects your aggregate reports continuously, shows you which senders are failing authentication, and alerts you when something changes.

Free plan includes 5 domains. No card required.