SPF Record Checker
Check an SPF record against RFC 7208: counts the 10 DNS lookups, follows includes and flags +all, duplicates and errors. Free, runs in your browser.
Updated 2026-10-20
Your query is sent only to the resolver shown; this site keeps no logs. Copy link to this result
Result
What this checks
DNSVerdict's SPF checker fetches the SPF record published as a TXT record on your domain, parses every mechanism and modifier, and follows each include: and redirect= to count DNS-querying terms against the limit of 10 in RFC 7208 §4.6.4. It flags +all, multiple SPF records, syntax errors and includes that point nowhere, and shows the include tree so you can see which provider uses up the budget.
How to read the result. The badge is green when the record parses with no errors and no warnings, amber for warnings (for example no all mechanism, a ptr term, or 8 or more lookups) and red for errors. The DNS lookups row is the total across the whole tree. Above 10 the receiver stops with permerror, and every message from the domain then gets an SPF error instead of a pass. The void lookups row counts queries that returned no record or no such domain; RFC 7208 §4.6.4 says implementations should limit them to two. The all row shows what happens to senders you did not list: -all is fail, ~all softfail, ?all neutral, and +all passes everyone. The include tree lists each included domain, its record and the lookups it uses.
Rules applied. A domain must publish exactly one record that begins with v=spf1; two make the result permerror (§3.2), so the tool reports the extra record as an error and evaluates the first. Mechanisms are evaluated left to right and the first match decides (§4.6.2). Terms after all are never reached (§5.1), and a redirect= modifier is ignored when all is present (§6.1). Only include, a, mx, ptr, exists and redirect cost a lookup (§4.6.4); ip4, ip6 and all do not, and ip4 and ip6 values are checked against the ABNF in §12 (dotted quad without leading zeros, prefix 0 to 32 or 0 to 128). The ptr mechanism is discouraged (§5.5). With no all and no redirect, unlisted senders get a neutral result (§4.7).
What it does not do. The tool does not test whether one particular sending IP would pass, and it counts an mx term as one lookup although the receiver also resolves the MX host names, which can add more. Keep a margin of one or two lookups below 10. A resolver failure on any included domain is shown as a warning and the count may then be incomplete.
The same check in a terminal. dig example.com TXT +short prints every TXT record; the one starting with v=spf1 is the SPF record. Count its include:, a, mx, ptr, exists and redirect= terms, then run the same command for each included domain, for example dig _spf.google.com TXT +short, and keep going down the tree. nslookup -type=TXT example.com works on Windows. A record such as v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.0/24 ~all spends two lookups on its own includes plus whatever those domains include in turn.
Common mistakes. Publishing a second v=spf1 record when adding a service instead of editing the existing one; adding an include for every marketing tool ever tried; ending with +all or ?all; writing a host name inside ip4; and treating ~all as protection against spoofing without DMARC. The fixes are in SPF too many lookups, SPF syntax errors and ~all versus -all. Pair SPF with the DMARC checker, because DMARC is what acts on an SPF failure.
If it fails
- Too many lookups (over 10): remove includes for services you no longer use, replace a and mx terms with ip4 or ip6 ranges where the addresses are stable, or move one sender to a subdomain with its own SPF record. Flattening works but goes stale when the provider changes its IPs.
- Multiple records: merge them into one record that holds all the mechanisms; receivers treat two records as permerror.
- +all: replace it with -all or ~all at once; +all authorizes every sender on the internet.
- Syntax error (unknown mechanism, bad ip4 or ip6 value, include without a domain): correct the term. A permerror makes receivers ignore the whole record.
- No SPF record: publish one TXT record that starts with v=spf1, lists your senders and ends with ~all or -all.
- Void lookups over 2: remove includes of domains that have no SPF record or no longer exist.
FAQ
Why is the SPF limit 10 DNS lookups?
RFC 7208 §4.6.4 caps the DNS-querying terms (include, a, mx, ptr, exists and redirect) at 10 per evaluation so that a sender cannot make a receiver run unbounded queries. When the count goes above 10, the result is permerror and SPF cannot help DMARC for that message. Terms inside nested includes count toward the same total.
Should an SPF record end in ~all or -all?
-all tells receivers to fail mail from unlisted senders, ~all marks it softfail (RFC 7208 §8.4, §8.5). With a DMARC policy in force, both lead to the same DMARC outcome, because DMARC acts on the failed alignment, so ~all is common and safe. Without DMARC, -all gives receivers a stronger signal but can bounce forwarded mail.
Do ip4 and ip6 mechanisms count as DNS lookups?
No. The ip4, ip6 and all mechanisms are matched without any DNS query, so they cost nothing (RFC 7208 §4.6.4). Only include, a, mx, ptr, exists and redirect count. That is why replacing a stable a or mx term with ip4 ranges frees lookups, at the price of editing the record whenever the addresses change.
My provider says SPF is fine but this checker shows an error. Why?
Providers usually test only their own include. This checker evaluates the whole record: an error inside an included domain, a second SPF record, a typo in your own terms or a total above 10 lookups still gives permerror for the whole domain. Read the Errors list and the include tree to find which domain causes it.