SPF permerror: “too many DNS lookups”, and how to get back under ten
A validator, a report or a bounce told you your SPF record produces permerror — usually with the words too many DNS lookups or maximum lookup limit exceeded. Your record is not malformed and nothing is misspelt. It costs a receiving mail server more DNS queries than the standard allows, so some receivers stop evaluating it and treat your domain as though it published no SPF at all. This page explains where the cost comes from and how to get back under the limit, in full and for free.
RFC 7208 §4.6.4 caps the DNS-querying mechanisms a single SPF
evaluation may cost at ten, and the count is
recursive: every include: you publish spends one, and
then spends whatever its record spends. Three includes belonging to three
large providers routinely cost nine or more between them.
- Costs a lookup:
include,a,mx,ptr,exists,redirect. - Costs nothing:
ip4:,ip6:,all. Addresses written out are free.
Free, no signup: what a stranger can already read about your domain
The count above is the one thing a DNS console will not show you. This walks your live SPF record the way a receiver does, expands every nested include, and returns the total against the limit - whether you are over it or one service away from it.
Type a domain and get four checks in about ten seconds: whether anyone can send email in your name (SPF, DKIM and DMARC), how long your HTTPS certificate has left, when your domain registration expires, and whether the site answers over HTTPS rather than plain http. No email address, no account, nothing installed. It runs the same code our paid monthly report runs.
Open the free check on its own page → · We measured 604 domains: 72-83% had at least one finding
Why the record still looks perfect
This is the part that makes the failure expensive. Your DNS console shows one line of
text, and that line is correct — correct syntax, correct providers, correct
-all at the end. The cost is not in your record. It is in the records your
record points at, which belong to other companies and change without telling you. A domain
that counted eight lookups last year can count eleven this year because a provider added an
include inside its own record.
So there is no moment where anything appears to break. The mail simply starts failing authentication, and every place you would look to explain it shows a valid SPF record.
Checking yourcompany.com's SPF costs a receiving mail server more than ten DNS lookups, and the standard allows ten. Over that, the result is permerror: receivers that enforce the limit act as though you had no SPF record at all. The record still looks correct in a DNS console, which is why this is usually found only by a tool.
The sentence above is the wording our own free checker returns for this finding, reproduced here from the running code rather than retyped.
What we measured
We counted the true recursive lookup cost of every SPF record published by the 83 independent small-business domains behind our published study. 69 of them publish an SPF record we could count all the way through. 1 is over the ten-lookup limit — 1.4% — and 1 sits at nine or ten, which is to say one added service away from it.
That is a low rate, and we are not going to inflate it. On this sample the ten-lookup problem is rare: most small businesses send through one provider and never come close. It becomes common the moment a domain is doing well enough to run a newsletter tool, a helpdesk, an invoicing system and a CRM at the same time — which is why the domains that hit it are rarely the ones that can afford the mail to fail.
Including ours. At the time this page was generated,
a3eecosystem.com — the domain you are reading this on — counts
9 of 10, from two
include: mechanisms. We publish that here for the same reason our own
check now reports it to us: a page about a fault we are one service away from is not
improved by pretending otherwise.
Checking yourcompany.com's SPF costs a receiving mail server nine or ten DNS lookups out of the 10 the standard allows. Nothing is wrong today. The day somebody adds one more include — a newsletter tool, a helpdesk, an invoicing system — the count goes over, the result becomes permerror, and receivers that enforce the limit act as though you published no SPF record at all. The record still reads correctly in a DNS console on that day, which is why this is normally found only after mail has already started failing.
The sentence above is the wording our own free checker returns for this finding, reproduced here from the running code rather than retyped.
The fix, in the order worth trying
- Count what you actually spend, recursively. Not the number of
include:mechanisms in your record — the total after every nested record is expanded. This is the number nothing in a DNS console shows you, and the reason this fault is normally found only after mail has already failed. - Delete senders you no longer use. This is the fix that works most
often and costs nothing. SPF records accumulate: a mail provider you migrated off, a
marketing tool from a campaign three years ago, a form plugin that was replaced. Each
dead
include:is still charging you one lookup, and frequently several. - Move bulk senders to a subdomain. Send newsletters from
mail.yourcompany.comornews.yourcompany.com, with its own SPF record and its own ten-lookup budget. The subdomain is a separate domain as far as SPF is concerned, so its cost is charged separately — and DMARC alignment still holds under the default relaxed mode, because the organisational domain is the same. - Replace an
include:with the IP ranges it publishes — “flattening” — only as a last resort, and only for a provider that publishes stable addresses.Flattening moves the failure rather than removing it. The whole point of an
include:is that the provider maintains the address list. Write those addresses into your own record and you have taken on that job silently and permanently: the day the provider adds a sending IP, your mail from it fails SPF and nothing anywhere will say why. If you flatten, put a calendar reminder on it. A flattened record is a maintenance commitment, not a fix. - Lean on DKIM. DKIM costs no SPF lookups at all, and a DKIM signature survives forwarding, which SPF alignment does not. A domain whose mail is properly DKIM-signed keeps passing DMARC even when SPF is having a bad day.
What a corrected record looks like
One record, one all, only the senders still in use. Never publish two
SPF records for the same name — two records is itself a permerror, and a different
one:
Type TXT
Name @
Value v=spf1 include:_spf.google.com include:servers.mcsv.net -all
Then the bulk sender on its own name, with its own budget:
Type TXT
Name news
Value v=spf1 include:sendgrid.net -all
Count yours
Our free check resolves your SPF record the way a receiver does, walks every nested record, and reports the total against the limit — both when you are over it and when you are one service away from it. It takes a few seconds, needs no account, and the number comes back whether or not anything is wrong.
What it cannot do, said plainly: it reads what your domain publishes right now. It cannot tell you which of your senders you have stopped using — only you know that — and a provider can change the cost of its own record tomorrow without touching yours. That last point is the entire argument for checking it on a schedule rather than once.
Fix it yourself. Then find out when it breaks again.
Everything on this page is the whole fix, free, with nothing held back. What a DNS change cannot do is tell you when somebody edits it back, when a certificate runs out, or when a registration lapses — all three carry dates and none of them announce themselves. A3E’s perimeter monitor re-runs all four checks every month and emails you only when something moves: CA$99/month per site, cancel any time. A single report with no monitoring is CA$29.
Check a domain free See the monitorQuestions
What does SPF permerror mean?
A receiving server could not finish evaluating your SPF record. The most common cause by far is that checking it would cost more than the ten DNS lookups the standard allows. Receivers that enforce the limit stop there and may treat your domain as though it published no SPF record at all.
Is the limit ten includes?
No, and this is the usual misunderstanding. It is ten DNS lookups in total, counted recursively: each include costs one, plus whatever that provider's own record costs. Three includes can easily cost nine. ip4 and ip6 addresses written out cost nothing.
Why does my DNS console show the record as valid?
Because it is valid. The cost is not in your record, it is in the records yours points at, which belong to other companies and change without notifying you. A record that counted eight lookups last year can count eleven this year with no edit on your side.
Should I flatten my SPF record?
Only as a last resort. Flattening replaces an include with the IP addresses it currently publishes, which silently transfers the job of maintaining that list from your provider to you. The day they add a sending address your mail from it fails and nothing will say why. Deleting senders you no longer use, and moving bulk senders to a subdomain, are both safer.
Can I publish a second SPF record to make room?
No. Two SPF records for the same name is itself a permanent error, and a different one. There must be exactly one, with exactly one all mechanism at the end.
Does a subdomain really get its own limit?
Yes. SPF is evaluated per domain, so news.yourcompany.com has its own ten-lookup budget. DMARC still aligns under its default relaxed mode because the organisational domain is unchanged, which is why moving a newsletter tool onto a subdomain is the cheapest real fix available to most senders.
The other five in this set
No DMARC record found: what it means and the record to publish
DMARC record published but invalid: why receivers discard it
DMARC p=none: what it does, and how to move off it safely
No SPF record found: the record to publish, and why SPF alone is not enough
Gmail 550-5.7.26: what it means and the records that fix it
The measurement behind every number on this page: 604 domains, method and limitations
Every figure on this page is generated from the stored raw measurement files behind our 604-domain study (522 agency-built sites measured 2026-08-20, 83 independent domains measured 2026-08-01), and the quoted finding wording is read out of the running checker at build time. An automated control re-asserts both against this live page on every operating cycle; if either changed and this page did not, it fails. Generated 2026-09-05T23:34:13Z.
← Back to all articles