← All tools

SPF Flattening Tool

The whole SPF job in one place: read any domain’s record the way a receiving server does, build a new one from the services that send for you, and flatten it when it goes over the limit of 10 DNS lookups.

SPF Toolkit

SPF flattening: when it helps, and what it costs you

01What flattening means

An SPF record that lists include: terms makes receivers run a DNS lookup for each one, and again for each include inside it. Flattening replaces those includes with the ip4 and ip6 ranges they resolve to. IP terms cost no lookups, so a record that was over the limit of 10 can come back under it.

02How to use the tool

  1. Enter the domain, or paste an SPF record. The tool follows every include and shows what each one costs.
  2. Choose which includes to flatten. Keep the ones you cannot flatten, such as exists terms.
  3. Copy the new record. If a single TXT string would be too long, the tool splits the addresses across sub-record includes.
  4. Publish it, then check the result with the SPF Record Checker.

03The trade-off

A flattened record is a snapshot. When a provider adds or moves servers, an include follows the change automatically and your flattened copy does not, so mail from the new addresses fails SPF with no error on your side. If you flatten, you have to refresh the record on a schedule, or use a service that does it for you.

Try the cheaper fixes first: remove senders you no longer use, move bulk senders to a subdomain with its own record, and prefer providers that give you one short include.

04What the tool cannot do

It changes nothing in your DNS: you publish the record yourself. It cannot flatten exists or ptr terms, and a flattened record is no help if the real problem is two SPF records or a missing sender.

Frequently asked questions

What is SPF flattening?

Replacing include terms in an SPF record with the IP addresses they resolve to, so the record needs fewer DNS lookups and stays under the limit of 10.

Is SPF flattening safe?

It is safe when the record is kept current. The risk is that providers change their IP ranges and your flattened record does not follow, which makes legitimate mail fail SPF.

What is the SPF 10 lookup limit?

The SPF standard (RFC 7208) allows at most 10 DNS-querying mechanisms and modifiers while a record is evaluated. Going over gives a permanent error, which fails SPF.

Do I need to flatten if I use only one provider?

Usually not. One provider rarely reaches 10 lookups. Flattening matters when several services, such as a mailbox provider, a sending platform and a CRM, add up to more than 10.

Is there an alternative to flattening?

Yes: remove unused senders, move bulk senders to a subdomain with its own SPF record, or use a provider that offers a short, stable include.

SPF is one of the records that decide inbox placement. We audit the whole setup, restructure the sending services so SPF stays valid, and fix what’s wrong.

How we help: Consulting · Private infrastructure · Managed mailboxes · Monthly support