Email authentication

SPF Flattener

Flatten your SPF record by resolving every include, a and mx down to raw IP addresses. Beat the 10 DNS-lookup limit and fix SPF permerrors — free, using live DNS.

Flatten an SPF record

Enter a domain. We resolve its live SPF record and every include down to raw IP addresses.

What this SPF flattener does

Fetches your live SPF record over DNS-over-HTTPS — real data, no guesswork
Recursively resolves include, redirect, a and mx down to IPs
Collapses many DNS lookups toward zero to beat the 10-lookup limit
De-duplicates IPv4 and IPv6 addresses automatically
Flags ptr, exists and CIDR mechanisms that can't be flattened
One-click copy of the ready-to-publish flattened record

Common use cases

  1. 1Fixing a "too many DNS lookups" permerror
  2. 2Consolidating several email providers into one lean record
  3. 3Auditing exactly which IPs your includes expand to
  4. 4Reducing SPF resolution time for faster mail acceptance
  5. 5Preparing a record that stays under the 10-lookup limit
  6. 6Documenting a provider's real sending IPs at a point in time

Related tools

About SPF flattening

SPF permits at most 10 DNS-querying mechanisms. Each include, a, mx and redirect counts, and large providers chain their own includes — so it is easy to exceed the limit and trigger a permerror that breaks authentication. Flattening replaces those mechanisms with the actual IP addresses they resolve to, dropping your lookup count toward zero.

The trade-off is maintenance: if a provider changes its sending IPs, your flattened record won’t know until you regenerate it. Flatten only the includes you must, keep a note to re-check periodically, and always confirm the flattened record still authorizes every legitimate sender before publishing.

More Free Tools Where This Came From

This utility is one of dozens of free, no-login tools for DNS, email, SEO and developers — all instant and private.

HostCloud.in  ·  Pune, India  ·  Serving 34,987+ Websites Since 2020

FREQUENTLY ASKED QUESTIONS

Got Questions? We Have Answers.

What is SPF flattening?

Flattening replaces an SPF record's include, a, mx and redirect mechanisms with the actual IP addresses they resolve to. The record then authorizes the same senders while using far fewer DNS lookups.

Why would I flatten my SPF record?

SPF allows at most 10 DNS-querying mechanisms. Large providers chain their own includes, so it is easy to exceed the limit and trigger a permerror. Flattening drops your lookup count toward zero.

What is the downside of flattening?

Maintenance. If a provider changes its sending IPs, your flattened record will not know until you regenerate it. Flatten only the includes you must and re-check periodically.

Does this tool use my real DNS records?

Yes. It resolves your live SPF record and all of its includes over DNS-over-HTTPS at the moment you run it — no cached or sample data.

What happens to ptr and exists mechanisms?

They are dynamic and cannot be flattened to fixed IPs, so the tool keeps them in the record and warns you. The ptr mechanism is deprecated and best removed entirely.

How often should I regenerate a flattened record?

Whenever a sending provider changes its IP ranges. As a safe habit, re-run the flattener every few months and after adding or removing any email service.