Help · Email and spam
SPF flattening: pros, cons and safer options
Direct answerDNSFix help, reviewed 2026-11-12The answer in one or two sentences. The steps below show how to do it. Our editorial policy says how we write and check these pages. Learn more
Flattening swaps include: entries for the IP addresses behind them, to get under SPF's 10-lookup limit. It works, but breaks silently when a service changes its addresses.
At a glance
The key facts on this page, in plain words. Our editorial policy says how we check them.- What we found: 3 key facts.
- Why people do it
- 10-lookup limit More than 10 DNS lookups makes SPF fail (RFC 7208).
- Risk
- Addresses change Services change their sending addresses without telling you.
- Try first
- Remove old services Most records go over the limit because of tools no longer used.
What flattening is
An SPF record may use at most 10 DNS lookups. Each include: costs at least one, and the services you include often add more. Flattening replaces each include with the IP addresses it points to (ip4: and ip6: entries), which cost no lookups.
Pros
- Gets you under the 10-lookup limit at once.
- No change at your email services.
Cons
- It goes stale. When a service adds or changes a sending address, your copied list is wrong and its email fails SPF, with no warning.
- Long records may need splitting, and big lists are hard to read and check.
Safer options, in order
- Remove services you no longer use. This fixes most records.
- Move a bulk sender to its own subdomain (for example news.yourbusiness.com) with its own SPF record.
- Rely on DKIM for tools that support it, so they don't need to be in SPF for DMARC to pass.
- If you still need flattening, use a service that re-checks the addresses automatically, and watch your DMARC reports.
Stop it happening againDNSFix can check your domain on a schedule and email you when something changes.
DNSFix Pro checks your domain every 4 hours and emails you the step-by-step fix soon after we spot a problem. From $19 a month.Questions
Is SPF flattening bad?
Not by itself, but a hand-flattened record breaks when a service changes its addresses. Only flatten with automatic updates.
How do I count my SPF lookups?
Run the SPF checker: it counts every lookup, including the ones inside each include.
Related
- SPF PermError: too many DNS lookups
- Old services still in my SPF record
- How to set up SPF (with examples)
- DKIM passes but DMARC still fails: the alignment trap
Product names belong to their owners. DNSFix isn't affiliated with them.