Skip to content
thenetworktools
Sign in

tool / spf-flatten

SPF Flattener

Flatten SPF includes under the lookup limit.

try

Workflow & Diagnostics

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.

1

Enter your sending domain.

2

View current lookup count vs 10-lookup limit.

3

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

RFC 7208 Section 4.6.4 dictates that email receivers must abort SPF evaluation if it triggers more than 10 DNS queries across include, a, mx, ptr, and exists mechanisms.
Technical Reference & Standards

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: and ip6: 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.