tool / spf-flatten
SPF Flattener
Flatten SPF includes under the lookup limit.
try
Real resolvers
Every gap labelled.
Each result shows its source and what was not tested.
How SPF Flattener works
RFC 7208 limits SPF evaluation to 10 DNS lookups. Exceeding this limit causes mailbox providers (Google, Yahoo, Microsoft) to reject mail with PermError. This tool flattens includes into direct IP ranges.
Enter your sending domain.
View current lookup count vs 10-lookup limit.
Copy optimized flattened TXT record to publish.
Specifications & Scope
About SPF Flattener
- 01 / What it does
- RFC 7208 limits SPF evaluation to 10 DNS lookups. Exceeding this limit causes mailbox providers (Google, Yahoo, Microsoft) to reject mail with PermError. This tool flattens includes into direct IP ranges.
- 02 / How to use
- 1. Enter your sending domain. 2. View current lookup count vs 10-lookup limit. 3. Copy optimized flattened TXT record to publish.
- 03 / Good to know
- Flattening eliminates lookup overhead, but you should re-run the flattener if your mail service providers (e.g. SendGrid, Google) update their sending IP ranges.
Got Questions?
Frequently Asked Questions
Knowledge Base
Technical Guides & Reference
Explore More
More in Security & Web
Tool Details & Usage Guide
RFC specifications, input expectations, outputs, and edge limitations.
Overview
RFC 7208 restricts SPF record evaluation to a strict maximum of 10 DNS lookups. When a domain includes multiple cloud email providers (e.g., Google Workspace, Microsoft 365, SendGrid, Zendesk), each include:, a, mx, and redirect= mechanism triggers additional lookups, quickly surpassing the ceiling.
Receiving mail servers evaluate records exceeding 10 lookups as a PermError (Permanent Error), frequently failing DMARC alignment and sending legitimate corporate communications to spam or quarantine.
The SPF Flattener recursively traverses your domain’s live SPF chain, aggregates all authorized IP addresses, and outputs a compressed, single-line record requiring zero DNS lookups.
Key Features & Output
- Live Lookup Counter: Accurately calculates current recursive queries vs the 10-lookup ceiling.
- Clean CIDR Consolidation: Eliminates duplicates and outputs discrete
ip4:andip6:blocks. - Instant Copy: One-click copy for the optimized, publish-ready TXT value.
Operational Limitations
- Dynamic Provider IPs: Cloud email providers occasionally update their IP ranges. When using a static flattened SPF record, periodic re-evaluation is recommended to maintain deliverability.
Recommended Troubleshooting Deep Dives
Authoritative SRE implementation tutorials related to this tool.
Troubleshooting SPF Flattening Errors in AWS SES
When Amazon Simple Email Service (SES) rejects a message because of an SPF flattening error, the problem is usually hidden in a maze of DNS lookups. Below is a ...
Read guideWhat Does Your IP Address Actually Expose About You?
Can someone really track your exact location from an IP address? Let us separate the Hollywood hacking myths from reality.
Read guideWhy Is My DMARC Policy Set to “none” and How to Change It
---...
Read guideRelated tools
View all toolsTech Stack
Free website technology checker. Detect the CMS, framework, server, CDN and analytics a site uses from its public headers and HTML.
Redirect Tracer
Free redirect checker. Follow every 301 and 302 hop from a URL to its final destination and spot long chains and loops.
SEO Analyzer
Free SEO analyzer. Check a page title, meta description, headings, images, canonical tag and social tags, and see what to fix.