LIVE DNS

SPF record flattener

Pull the live SPF TXT record, expand every include, and rebuild it as flat IP addresses under the RFC 7208 limit of 10 DNS lookups.

Loading tool…

Your mail is being sent unauthenticated. Here is the full fix.

Lower stack cost. Back in the inbox. Built to send at any scale.

We rebuild it properly: secondary domains, inboxes, SPF, DKIM and DMARC set to enforcement, warmup and safe sending limits, blacklist monitoring on top. Send-ready in about 17 days. No campaigns, no copy, no lead lists. Infrastructure only.

Almost a decade building cold outreach infrastructure, including his own sending and verification stack built from scratch. 20+ B2B clients at companies worth $10M and above, all in tier one countries.

Free · Written plan + fixed price · No sales call required

What SPF flattening does

SPF flattening replaces the include mechanisms in an SPF record with the IP addresses those mechanisms point to. Every include, a, mx, ptr, exists and redirect mechanism costs a DNS lookup when a receiver checks your mail, and RFC 7208 allows at most 10 lookups in one check. Pass that limit and the check returns a permanent error, so authentication fails even when the record is otherwise correct.

This tool fetches your live record, expands includes recursively, counts lookups the RFC 7208 way, and builds a flattened record from ip4 and ip6 mechanisms. The flattened record needs no extra lookups to work.

How to use it

  1. Enter your sending domain and run the flattener.
  2. Compare the lookup count before and after flattening.
  3. Copy the flattened record and publish it as the TXT record for your domain, in place of the old v=spf1 record.
  4. Run the SPF Checker after DNS updates, and re-flatten when a provider changes its sending addresses.

Watch out

A flattened record is a snapshot. If a provider adds or removes sending IPs, the flattened record does not update itself, so re-run this tool on a schedule. Keep one SPF record per domain, and check the length of a long flattened record before you publish it.

FAQ

What is SPF flattening?

Flattening turns include mechanisms into the IP addresses behind them, so receivers do not need extra DNS lookups to work out who may send for your domain.

Why does SPF fail after 10 lookups?

RFC 7208 caps an SPF check at 10 DNS lookups to stop abuse and loops. Over the cap, receivers return a permanent error called PERMERROR and SPF fails.

Is a flattened SPF record safe to publish?

Yes, if the IPs came from your current record and you publish it as the only v=spf1 TXT record for the domain. Test with the SPF Checker right after publishing.

How is this different from the SPF Checker?

The SPF Checker audits the record you have. This tool rebuilds that record as flat IP addresses and shows the lookup count before and after.

Which mechanisms does this tool expand?

It expands include and redirect mechanisms recursively, and resolves a and mx mechanisms to IP addresses. ip4 and ip6 terms pass through as they are.

What happens to the all policy at the end?

The policy from your original record, such as -all or ~all, is kept at the end of the flattened record. Policies inside included records are dropped.

Do I need to re-flatten my record?

Yes, from time to time. Providers change sending ranges, and a flattened record only holds the addresses found when you ran the tool.

What if my domain has no SPF record?

There is nothing to flatten. Build a record with the SPF Record Generator first, publish it, then flatten it if it needs too many lookups.

Can flattening fix every SPF problem?

No. Flattening fixes lookup count problems. It does not fix typos, duplicate SPF records, a missing record, or a policy that names the wrong senders.

Copied
Free tools Get an inbox plan