How to Use the SPF Flattening Tool
Using our SPF flattening tool requires only a few clicks and gives you immediate visibility into your email authentication infrastructure. Instead of guessing how many lookups your providers consume behind the scenes, you can diagnose and fix the problem in minutes.
Start by entering your domain name or pasting your existing raw SPF record into the tool. The system will automatically query public DNS to pull the active record.
The tool parses your record and displays exactly how many DNS lookups you are currently using. It breaks down the count by provider to show you exactly which includes are consuming your limits.
With a single click, the tool traces every nested include, extracts the underlying IP addresses, and condenses them into a clean, flat list.
You can copy the newly flattened record and manually update your DNS registrar or switch to automatic updates. Our platform will monitor your vendors and refresh the IPs automatically.
What Is SPF Flattening?
SPF flattening is the process of converting a complex SPF record that contains multiple nested mechanisms like include:, a, mx, or redirect= into a simplified version that lists the resolved IP addresses directly. Instead of telling receiving mail servers to recursively look up which IPs each of your email vendors uses, a flattened record pre-resolves all of that data and writes the answer straight into your DNS.
Using an SPF flattener allows organizations with many third-party email senders to consolidate their records. Without SPF record flattening, you risk failing authentication checks due to excessive nested lookups. A good SPF flattening service automates this process to keep your domain secure and compliant with authentication standards.
Learn moreHow the 10 DNS Lookup Limit Works
Every time a receiving mail server evaluates your SPF record, it follows each include, a, or mx mechanism to find the authorized IPs. Under RFC 7208 (the formal SPF specification), this chain of resolution is capped at 10 DNS lookups. Exceed that cap, and SPF returns a PermError (permanent error), which typically causes your legitimate emails to fail authentication and land in spam or get rejected outright.
What Happens When You Exceed It (PermError)
When your record needs more than 10 lookups to resolve fully, mail servers stop evaluating at the 10th lookup, so any services listed from that point on simply go unchecked. SPF returns PermError, and depending on your DMARC policy, emails from those unchecked services may be unavailable or rejected. The failure is usually silent: you don't get a bounce but your emails will just start dropping.
include:spf.protection.outlook.cominclude:_spf.google.cominclude:spf.mandrillapp.cominclude:_spf.salesforce.cominclude:sendgrid.netinclude:mail.zendesk.comDo You Actually Need to Flatten Your SPF Record?
Before flattening your SPF record, determine whether you actually need it. The SPF 10 DNS lookup limit is often exceeded because of outdated or unnecessary entries rather than a genuine need for flattening.
Start with an SPF audit:
Review your current SPF record and identify all include: statements.
Remove entries for marketing platforms, CRM tools, and third-party vendors you no longer use.
Check whether this cleanup brings your record below the 10-lookup limit.
If you still exceed the limit after a thorough audit, consider SPF flattening or a hosted SPF solution.
Why hosted SPF is often the better choice:
Manual flattening replaces include: statements with static IP addresses, which can become outdated when vendors change their infrastructure.
Static records require ongoing monitoring and maintenance to remain accurate.
Hosted SPF dynamically manages your SPF record and lookup requirements at the server level.
This makes hosted SPF a more scalable option for organizations that rely on multiple cloud services and third-party senders.
The Core Problem with Static SPF Flattening
Flattening resolves all those include: mechanisms into their underlying IP addresses and writes them directly into your record. In theory, it eliminates the nested lookups entirely. In practice, a statically flattened record has a predictable lifespan: the moment any of your email vendors changes their IPs, your flattened record is wrong.
DNS TXT records have practical size limits (255 bytes per string). A fully expanded record with many IP ranges can exceed them, causing its own validation failures.
Every time you add a new email service, you re-flatten. Every time you remove one, you re-flatten. This becomes unsustainable as infrastructure grows.
No notification mechanism exists in the SPF standard. When a vendor moves IPs, you only find out when deliverability has already dropped.
How Our Automatic SPF Flattening Works
PowerDMARC's SPF flattening tool is part of the PowerSPF hosted SPF service, and handles the full process automatically, keeping your record current as your email infrastructure changes.
Sign up and add your domain. PowerDMARC auto-detects your current SPF record instantly with no manual input needed.
See exactly how many DNS lookups your record uses, which services contribute the most, and whether you're at risk of PermError.
All include mechanisms resolve to their current IPs and compress into a single optimized include. Your count drops to 1.
Publish the new record. PowerDMARC monitors your vendors and auto-reflattens when IPs change, so it never goes stale.
Operational bottlenecks and hidden friction built on manual tracking.
Adding third-party services manually quickly pushes your DNS past the 10-lookup limit, breaking email delivery without warning.
When vendors update their underlying IP addresses, your static manual record falls out of date silently until you notice broken delivery.
Manually expanding sub-records causes strings to balloon rapidly, easily exceeding the strict 255-character limits for individual DNS strings.
Typing typos, formatting syntax incorrectly, or miscopying long blocks of IP ranges introduces critical security and deliverability failures.
Requires continuous manual audits, spreadsheet monitoring, and developer time just to keep tracking standard business applications.
Automated, efficient security infrastructure inside your native environment.
Advanced dynamic mapping automatically condenses numerous lookups safely below the 10-lookup protocol max threshold limit.
Background automated checking scripts detect system vendor changes instantly, auto-refreshing network updates seamlessly inside minutes.
Intelligent algorithmic text block wrapping strips redundant syntax spaces, compressing records to minimize character footpaths.
Eliminates risky custom manual structural operations, leaving software rules to systematically oversee your platform configurations error-free.
Deploy one permanent static engine configuration handle and protect long-term digital domain authentication parameters continuously.
SPF Flattening Risks and Best Practices
SPF flattening is a legitimate technique, but it carries risks worth understanding before you rely on it, especially if you plan to maintain the record manually.
Risks to know before you start
IP address changes — Major providers regularly change outbound IP ranges; when they do, mail from the new IPs fails SPF immediately, and you only know when deliverability drops.
Record bloat & DNS limits — A flattened record for an org with many services can expand to hundreds of IP entries, pushing past practical size limits, causing Permerror.
Maintenance burden — A manual record isn't a one-time fix. Add a service, remove one, or have a vendor update infrastructure, and you re-flatten and re-publish.
Best practices
Authorize only active, legitimate senders — Before flattening, audit your record and remove includes for services you no longer use. Every unnecessary entry adds to your lookup count and attack surface.
Monitor SPF pass/fail rates in DMARC reports — Aggregate reports show exactly which sources pass and fail. Unexplained failures after flattening usually point to a stale IP range.
Use SPF alongside DKIM and DMARC — SPF alone doesn't stop spoofing. Proper authentication needs all three: SPF and DKIM for alignment, DMARC to define what happens when they fail.
Re-validate after any infrastructure change — Whenever you add or remove an email service, check your record with an SPF checker before assuming it's still valid.
SPF Flattening Approaches Compared
Managing the DNS lookup limit can be handled in a few different ways. Here is a comparison of the four main approaches available today.
What Makes a Good SPF Flattening Tool?
A good SPF flattening tool should simplify SPF management while keeping your records accurate and reliable. Look for these key features:
Does it update IP addresses when vendors change their infrastructure? This prevents outdated records and repeated manual updates.
Does it warn you before your SPF record exceeds 512 bytes? Early warnings help prevent oversized DNS records and configuration issues.
Does it show which include: statements are consuming your SPF lookups? This makes it easier to identify unnecessary or high-usage entries.
Can you manage SPF records for multiple domains from one dashboard? Centralized management is useful for organizations with larger domain portfolios.
Is there a free tier or trial you can use to test the tool? This lets you validate the solution against your actual SPF configuration.
Does it integrate with DMARC reporting and deliverability data? This helps you measure the impact of SPF changes on email authentication.
Why choose PowerDMARC's SPF Flattening Tool?
Our SPF flattening tool turns a complex, manual process into a simpler, automated workflow.
Stay within the lookup limit: Convert complex SPF configurations into a single optimized include.
Automatic updates: Monitor vendor IP changes and keep your SPF record current.
Less maintenance: Get the benefits of SPF flattening without managing static IP lists manually.
Centralized visibility: Manage SPF alongside DMARC reporting and other email security tools.
Trusted by Thousands Worldwide
Jennifer Heisel
Systems Administrator
"PowerDMARC eliminates the SPF lookup limit on our domains with the hosted SPF; we only need to publish 1 SPF record to our DNS."
David Spigelman
President
"PowerDMARC helps a lot with SPF errors, in particular, by making it easy to do "SPF Folding," which is often needed for customers who need more SPF includes than are otherwise technically allowed."
Dylan Bouterse
Technology Security Consultant
"With SPF flattening, we were able to easily expand the SPF includes to inspect the specifics of the record."
Frequently Asked Questions
What happens if my SPF record exceeds 10 lookups?
Does SPF flattening increase security?
Should I flatten records provided by Google/Microsoft?
How do I know when to re-flatten?
Is flattening still recommended in 2026?
What is the difference between SPF flattening and SPF macros?
Can I have two SPF records on the same domain?
Is there a free SPF flattening tool?
What's the difference between an SPF flattener and hosted SPF?
How often do I need to re-flatten my SPF record?
Ready to Fix Your SPF Record?
SPF flattening doesn’t have to be a recurring problem. Our tool makes it effortless!