HomeEmailGuides → SPF lookup limit

Ten lookups.
Eleven breaks everything.

SPF has a hard ceiling of ten DNS lookups per evaluation. Cross it and receivers return permerror — which does not mean "partly working". It means your SPF record no longer authenticates anything, including the mail it used to pass.

From running our own mail infrastructure · August 2026 · by SPELL
10Lookups allowed
permerrorWhat 11 gives you
0Warnings from anyone
DKIMThe durable alternative

What counts toward the ten

The limit is on DNS-querying mechanisms, not on the length of the record. These count:

MechanismCountsNote
include:1 eachPlus everything inside it, recursively
a, mx1 eachmx also caps at 10 MX records
ptr1Deprecated — remove it
exists:, redirect=1 each
ip4:, ip6:, all0No DNS query — free

Recursion is what actually gets you

An include: is not one lookup — it is one plus whatever that record contains. A single large provider's include can carry four or five of its own. Three such providers and you are at the ceiling with a record that looks short and innocent.

Worse: those are their records. A provider adding an include on their side can push you over the limit without you changing anything, and nobody tells you.


Counting yours

Start with the record itself:

dig +short TXT example.com | grep spf1

Then expand each include: and count recursively. Doing it by hand is tedious and error-prone; any SPF validator will do it for you and print the total. What matters is the number and which include is responsible for most of it.

To confirm a real failure rather than a theoretical one, read the headers of a delivered message. A receiver reporting spf=permerror is the ground truth, and it is the same Show original view in Gmail we use for checking alignment.


Getting back under ten


A word on SPF flatteners

Services exist that "flatten" your record — resolving every include to raw IPs and hosting the result, usually behind a paid subscription that re-flattens when providers renumber.

They work. They also make a provider's IP changes your outage risk, and add a dependency to the path that decides whether your mail is delivered. Before subscribing, try removing unused senders and moving one high- volume sender to its own subdomain — that resolves most records we look at, permanently and for free.

The durable position

SPF under ten lookups, DKIM signing on your own domain for every sender, and DMARC alignment achieved through DKIM rather than SPF. Then the lookup ceiling stops being something you manage and becomes something you simply stay under.

Send us your domain and we will count them

We will expand every include, tell you your true lookup count, which sender is responsible, and whether you are already returning permerror. Free, and it takes ten minutes.

Book a call →

More on this