SPF Flattening Tool
Resolve SPF includes to IP addresses to reduce DNS lookup count below the RFC 7208 limit of 10.
Frequently Asked Questions
What is SPF flattening?
SPF flattening is the process of replacing include: mechanisms in an SPF record with the actual IP addresses they resolve to. This reduces the number of DNS lookups required to evaluate the SPF record. RFC 7208 limits SPF to 10 DNS lookups — each include:, a, mx, ptr, and exists: mechanism counts toward this limit. When you use many email services (Google, Mailchimp, Salesforce, HubSpot), each include: consumes one or more lookups, quickly exceeding the limit.
Why does my SPF record exceed 10 DNS lookups?
Modern organisations often use multiple email services, each requiring an SPF include: that itself may contain further includes. For example, include:_spf.google.com, include:servers.mcsv.net (Mailchimp), include:_spf.salesforce.com, and include:sendgrid.net each count as at least one lookup, and some resolve to further includes. It is easy to exceed 10 lookups without realising it. An SPF lookup counter or flattening tool reveals the exact count.
What are the risks of SPF flattening?
The main risk of SPF flattening is maintenance burden. When a service provider changes their IP ranges, your flattened record becomes outdated and may fail to authorise legitimate email from that provider. Flattening requires regular monitoring and updates. Some tools offer automatic flattening with monitoring, but this adds operational complexity. An alternative is to use macros or reduce the number of email services to stay within the 10-lookup limit organically.
What happens if my SPF record exceeds 10 DNS lookups?
If an SPF record requires more than 10 DNS lookups to evaluate, the receiver must return a PermError result — as if the domain had no SPF record. This means SPF fails for all senders, including legitimate ones. A PermError is treated as a neutral or fail result depending on the receiver's policy. Combined with a DMARC policy, this can cause legitimate email to be quarantined or rejected. Use an SPF lookup counter to verify your record stays within the limit.