Free tool · runs in your browser
SPF flattener
Resolve every include, redirect, a and mx in an SPF record down to raw ip4/ip6 addresses — producing a single record with zero DNS lookups that fixes the PermError caused by exceeding the 10-lookup limit. Runs recursively in your browser over DNS-over-HTTPS.
SPF flattener FAQ
What is SPF flattening?+
SPF allows only 10 DNS-lookup mechanisms (include, a, mx, ptr, exists, redirect). Flattening resolves all of those down to the raw ip4/ip6 addresses they point to, producing one record with zero lookups. It's the standard fix for a record that returns PermError because it exceeds the limit.
What's the catch with a flattened SPF?+
Maintenance. Once flattened, your record no longer follows the providers' include records — so if a sender (say your ESP) changes its IP ranges, your flattened record goes stale and can start failing legitimate mail. You must re-flatten whenever an included sender updates its IPs.
Does it resolve nested includes?+
Yes. It recursively resolves include and redirect to their published SPF records, plus a and mx to their addresses, collecting every ip4/ip6 with loop protection and a depth limit. ptr and exists can't be flattened to fixed IPs, so they're kept as-is and flagged.
Will this fix my PermError?+
If the cause is too many DNS lookups, yes — a flattened record has zero lookups. Check your current count first with the SPF checker; if you're over 10, flatten (or better, remove unused includes). Keep the result under the 255-character DNS string limit, splitting into multiple strings if needed.
Related: SPF checker · DNS lookup