Free forever
SPFFlattener
Collapse nested SPF includes into a single record that uses only IP addresses. Zero DNS lookups, no 10-lookup limit. Flattening trades a lookup problem for a maintenance one, so read the guide before you commit to it.
14-day free trial · no credit card · cancel anytime
If you enter a domain, we'll fetch its live SPF record first.
SPF fails in a way most senders never see coming: the 10 DNS lookup limit. Every include, a, mx, redirect and exists mechanism in your record costs a lookup, and includes count everything they include in turn. Go past ten and receivers return permerror, which many treat as if SPF did not pass at all.
This free SPF flattener resolves your record's includes into the IP addresses they authorize and rewrites the record as ip4 and ip6 mechanisms, which cost zero lookups. The result authorizes exactly the same senders, just without the lookup chain.
Flattening is a trade: the record no longer follows your providers automatically when they change their IP ranges. Treat a flattened record as a snapshot that needs re-checking, not a set-and-forget fix.
How it works
- 01Enter your domain. The flattener fetches your current SPF record and follows every include it references, the same way a receiving server would.
- 02Review the resolved result: each include expanded to the IP networks it authorizes, with the total lookup count before and after.
- 03Copy the flattened record and publish it as your domain's TXT record, replacing the old value. Your qualifier (~all or -all) is preserved.
- 04Re-run the flattener when you add or remove a sending service, or on a schedule, since providers rotate IP ranges without notice.
When to use it
Flatten when your record is over or near the 10 lookup limit, which typically happens after connecting four or five sending services, each bringing an include with nested includes inside. Permerror in a DMARC report or an SPF checker is the usual symptom.
Flattening is not the only fix. Removing includes for services you no longer use is safer, and moving marketing mail to a subdomain with its own record splits the lookup budget. Flatten what remains when trimming is not enough.
Common mistakes
Flattening once and never again
Providers add and retire IP ranges without telling you. A flattened record from six months ago can silently stop authorizing part of your provider's fleet, failing SPF for mail you legitimately sent.
Flattening providers that rotate IPs aggressively
Some providers document stable ranges; others rotate constantly and tell you to use their include. A hybrid record that keeps the volatile include and flattens the stable ones is often the right shape.
Leaving the old includes in place
The flattened IPs replace the includes they came from. Keeping both defeats the point: the lookups still happen and the record usually gets longer than DNS comfortably serves.
Changing the all qualifier while flattening
Flattening changes how senders are listed, not policy. If you were at ~all, stay at ~all until reports say every legitimate sender passes; tightening to -all in the same edit makes failures impossible to attribute.
Frequently asked questions
What does this SPF flattener output?
A single TXT record where each include is replaced by the ip4 and ip6 networks it currently resolves to, preserving your mechanism order and final all qualifier. The output authorizes the same servers with zero DNS lookups.
Why is my record over the limit with only a few includes?
Includes nest. One provider include can reference three or four more inside it, and each nested include costs a lookup too. Five visible includes routinely spend nine or ten lookups once expanded.
Does flattening affect DKIM or DMARC alignment?
No. Flattening changes which mechanism authorizes an IP, not the domain being evaluated. Mail that aligned before flattening aligns identically after, and DKIM is untouched entirely.
Can I flatten only part of my SPF record?
Yes, and it is often the best shape: flatten providers with stable published ranges and keep the include for providers that rotate IPs frequently. Every include you remove saves its whole nested lookup chain.
Is a long flattened record a problem for DNS?
TXT values over 255 characters must be split into multiple quoted strings, which receivers concatenate; most DNS providers do this automatically. Very long records are valid, but if yours balloons, trim unused services first.
What is permerror and does flattening fix it?
Permerror means the receiver could not evaluate your record at all, and exceeding 10 lookups is the most common cause. Flattening removes the lookups, which clears that class of permerror immediately.
Related free tools
These tools answer the question once. Continuous monitoring re-checks your domain every 6 hours and alerts you when the answer changes, from $14/mo. Pricing · Guides · FAQ
This answers once. Monitoring answers every 6 hours.
LitInboxes re-checks DNS, DMARC, and blocklists on a schedule and emails you when the answer changes. Start with a 14-day free trial.
14-day free trial · no credit card · cancel anytime
