SPF Flattener

Expand a domain's SPF includes into raw IPs to stay under the 10-lookup limit.

Free • no sign-up • runs entirely in your browser.

Why flatten SPF?

SPF allows only 10 DNS lookups when a receiver evaluates your record. Each include, a, and mx counts, so domains using several email providers easily exceed it — causing a PermError that effectively fails SPF. Flattening resolves all those includes down to plain ip4/ip6 entries, which cost zero lookups.

The trade-off

Flattening produces a snapshot of your providers' current sending IPs. If they change those IPs (Google and Microsoft rotate ranges), your flattened record goes stale and legitimate mail can fail. Re-flatten periodically, or only flatten the specific includes pushing you over 10 — keep the rest as normal includes.

Frequently asked questions

What causes an SPF PermError?

More than 10 DNS-lookup mechanisms in your SPF record. Flattening or reducing includes brings you back under the limit.

Is flattening safe?

It works, but it's a maintenance trade-off: the IP list is a point-in-time snapshot. If a provider changes their sending IPs you must re-flatten or mail will fail.

Do ip4/ip6 entries count toward the limit?

No. Only mechanisms that require a DNS query (include, a, mx, ptr, exists, redirect) count. That's why flattening to ip4/ip6 fixes the limit.