Free Tool

SPF Flattening Tool

Resolve all SPF includes into IP addresses, visualize your lookup count, and generate a flattened record that stays under the 10-lookup limit.

Your results

Enter a domain to resolve all SPF includes, count DNS lookups, and generate a flattened record.

Understanding SPF flattening

What is SPF flattening?

SPF flattening takes your SPF record and recursively resolves all include:, a:, and mx: mechanisms into their underlying IP addresses. The result is a "flat" SPF record that uses only ip4: and ip6: mechanisms, requiring zero DNS lookups to evaluate.

What is the 10-lookup limit?

RFC 7208 limits SPF evaluation to 10 DNS lookups. Each include:, a:, mx:, redirect=, and exists: mechanism counts as one lookup. Nested includes count too. If your record exceeds 10, receiving servers return a PermError and SPF fails — potentially causing your emails to be rejected or flagged as spam.

When should I flatten my SPF record?

You should consider flattening when your SPF record has more than 7-8 lookups, or if you use multiple email services (Google Workspace, Microsoft 365, SendGrid, Mailchimp, etc.) that each add their own include: directives. Organizations using 3+ email providers commonly hit the 10-lookup limit.

What are the risks of SPF flattening?

IP addresses can change. When your email providers update their infrastructure, the IPs in your flattened record become stale. You need to re-flatten regularly (weekly or monthly) or use a dynamic flattening service. A stale flattened record can cause legitimate emails to fail SPF checks.

Tired of reading emails?

Let AI extract your action items

Unboxd reads every email and gives you a daily briefing with only what matters.

Gmail Outlook Start for free