SPF Record Checker: Validate SPF and Count DNS Lookups Against the Limit of 10
SPF breaks quietly. A record that needs more than 10 DNS lookups still looks fine in your DNS panel, but receivers return a permanent error for mail that reaches the 11th lookup, and SPF then fails. The Dotcom-Tools SPF Record Checker follows every include: and redirect=, counts the lookups the way receivers do, and shows which provider uses up the budget.
Add a sending IP and we evaluate the record for that address, step by step, exactly as a receiving server would.
What this check covers
At a glance
- Worst-case lookup count:
include,a,mx,ptr,existsandredirecteach count 1 wherever they appear in the tree;ip4,ip6andallcount nothing. More than 10 is a Fail, 9 or 10 a Warning. - The whole tree: we keep following past 10 (up to 30), so you see every include and its running total.
- Void lookups: names that return no records, including the address lookups behind
aandmx. More than 2 is a Fail. - Syntax: two SPF records, an unknown mechanism, a bad IP range, a second
redirect=, or two strings joined without a space are all named precisely. - Sending IP: the result (pass, fail, softfail, neutral, permerror) and the path it took, with its own lookup count.
- Only the SPF check runs on this page (1 credit). For MX, DKIM, DMARC and the rest, use the Email DNS Checker.
How to check an SPF record
- Enter the domain that sends the mail, such as
example.com. - Optional: enter a sending IP, for example the address in a bounce message, to see whether it passes.
- Click Check SPF record and read the lookup count and the tree.
Reading the include tree
Each row is one term, indented under the record that contains it, with the lookups it adds and the running total. Rows past the 10th lookup are red: mail whose check reaches them can fail. When microsoft.com was checked on 29 November 2026, its record used 6 lookups through _spf-a.microsoft.com, _spf-b.microsoft.com, _spf-ssg-a.msft.net and _spf1-meo.microsoft.com, with Exchange Online's spf.protection.outlook.com nested inside the first.
How to fix "too many DNS lookups"
- Remove includes for services you no longer send from. Old marketing and helpdesk tools are the usual culprits.
- Replace
aandmxwith theip4:ranges they stand for when those addresses rarely change. - Move a sender, such as a newsletter platform, to a subdomain (
news.example.com) with its own SPF record. - Avoid
ptr: it's deprecated, slow, and still costs a lookup.
The all term
| Ends with | Meaning |
|---|---|
-all | Mail from other servers fails SPF. Recommended once your list is complete. |
~all | Soft fail: fine while DMARC is enforcing. |
?all or nothing | SPF never fails a message: a Warning. |
+all | Authorizes the whole internet: a Fail. |
Related checks
- DMARC Checker: DMARC decides what happens to mail that fails SPF and DKIM.
- DNS Propagation Checker: after editing SPF, see which resolvers have the new record.
Frequently asked questions
What counts toward the SPF 10-lookup limit?
Every include, a, mx, ptr, exists and redirect, including those inside included records. ip4, ip6 and all don't count, and the address lookups an mx term does for its hosts don't add to the count.
Why do you say SPF "can" fail rather than "will"?
Receivers evaluate the record left to right and stop at the first match. Mail from a server listed early never reaches the later terms, so only senders matched after the 10th lookup, or not matched at all, get the error.
Can a domain have two SPF records?
No. With two TXT records starting v=spf1, receivers return a permanent error. Merge them into one.
What is a macro such as %{i}?
A placeholder filled in from each message, such as the sender's IP. We count the term as one lookup but don't query it, because it can only be evaluated against a real message.
Last updated: