SPF Flattening

SPF flattening: replace include: chains with direct ip4: addresses to stay under the 10-DNS-lookup limit. Free flattener tool.

Flattened SPFInclude-based SPF
DNS lookups0 (all ip4: addresses)1 per include: mechanism
10-lookup limitNever exceededCan be exceeded
MaintenanceHigh: IPs change without noticeLow: provider manages their own IPs
RiskStale IP list if provider rotatesPermerror if too many includes
Best forStatic infrastructure, 1-2 providersDynamic cloud providers

Technical details

SPF flattening is the process of replacing include: mechanisms in a v=spf1 record with the resolved IP addresses (ip4: and ip6:) of those includes' mail servers.

The flattening process queries each included domain's SPF record, extracts the IP addresses, and rewrites the parent record to reference those IPs directly.

The primary risk of SPF flattening is staleness: if a provider rotates their sending IPs without notice, the flattened record references dead IPs and legitimate mail is not authorized.

Frequently asked questions

Does our free flattener monitor for IP changes?+

No, the flattener is a one-time tool. For continuous monitoring, use our monitoring service which alerts you when your SPF record changes.

Can I flatten a record with more than 10 includes?+

Yes. The flattener resolves all includes recursively and outputs a single record with direct IP addresses. The result will have 0 DNS lookups.

Does flattening remove the need for DKIM?+

No. Flattening fixes the SPF lookup limit; DKIM still covers forwarding and alignment. Flattening without monitoring risks silent staleness.

Check your domain with our free tools: SPF checker, DMARC checker, DKIM checker.

Last verified: 2026-10-28