Validate SPF DNS syntax, check a domain SPF record, parse mechanisms and count include-chain DNS lookups against the 10-lookup limit.
Enter a domain above to check its SPF record, validate SPF DNS syntax, parse mechanisms and count DNS lookups.
SPF (Sender Policy Framework) is a single DNS TXT record that lists which servers are allowed to send mail for your domain. This SPF record checker reads the published v=spf1 value, validates SPF DNS syntax, and explains every mechanism in the sender policy.
The most common failure is the 10-lookup limit: every include, a, mx, ptr, exists and redirect term costs a DNS query, and nested includes count too. Cross 10 and the whole record returns a PermError. The ip4 and ip6 terms are free, so flatten stable includes into ranges where you can.
SPF helps receivers evaluate whether the connecting server is authorized, but it is not a complete anti-spoofing system by itself. Pair SPF with DKIM and a DMARC policy so receivers can also evaluate domain alignment and reporting.
Two records for example.com and what the checker reports for each.
v=spf1 ip4:192.0.2.0/24 ip6:2001:db8::/32 -all
Result: 0 / 10 DNS lookups, 3 mechanisms, 2 sending sources, policy
-all
· HardFail, and all seven validation checks pass.
ip4,
ip6
and
all
never cost a lookup.
v=spf1 include:_spf.example.net mx ~all
If
_spf.example.net
publishes
v=spf1 ip4:198.51.100.0/24 ~all, the DNS lookup chain looks like this:
example.com v=spf1
├─ include:_spf.example.net +1
│ ├─ ip4:198.51.100.0/24 0
│ └─ ~all 0
├─ mx +1
└─ ~all 0
Total: 2 / 10 lookups. The record is still marked Valid, but the enforcement check asks for review because
~all
(SoftFail) only flags unauthorized mail. Provider includes often nest further includes, so one
include
can cost several lookups.
all
term:
-all
HardFail,
~all
SoftFail,
?all
Neutral,
+all
Pass, or none when the record has no
all
term.
ip4,
ip6
or
include
terms.
v=spf1
version tag, the lookup count, the enforcement qualifier, no
+all, no deprecated
ptr, and the TXT answer size against the 450-octet guideline of RFC 7208.
+1
when it costs a DNS lookup.
include; check the lookup count first so it does not push the record past 10.
permerror
or unexpected fails, confirm what is actually published. The
DMARC policy checker
shows whether a
rua
address is collecting aggregate reports at all.
v=spf1 -all: zero lookups and no authorized senders.
Too many
include,
a,
mx,
exists
or
redirect
terms, often hidden inside nested includes. Remove includes for services you no longer use, and replace
a
and
mx
with the
ip4
/
ip6
ranges they resolve to when those servers are yours. Only flatten a provider include into IP ranges if you can keep the copy current: providers can change their sending ranges, and a flattened list does not update itself.
Two TXT records on the domain start with
v=spf1
— usually because a new provider's setup instructions were followed literally. Merge all terms into one record with a single
all
term at the end. The checker parses the first record it receives, so the rest of the results describe only one of them.
SPF is checked against the envelope sender (Return-Path) domain, so the record must sit on that exact hostname — usually the bare domain, not
www
or an
spf.
subdomain — and the value must start with
v=spf1
as its first term. A recent change may still be cached until its TTL expires, and DNS errors such as timeouts or SERVFAIL are reported the same way as a missing record. Query the TXT record directly with the
DNS lookup tool
to see what resolvers return.
The top-level record has no
all
term. If it ends with a
redirect=
modifier, the effective policy comes from the redirect target, which the badge does not read; check that domain separately. Without either, senders that match nothing get a Neutral result.
A TXT query returns every TXT record at the name, so old site-verification tokens add to the size as much as the SPF record does. Above roughly 450 octets the answer may not fit in a 512-octet UDP response; receivers then have to retry over TCP, and some ignore the record when that fails. Remove TXT records you no longer need and drop includes for retired senders. The length of a single quoted string is not the issue: values over 255 characters are split into several strings in one record, most DNS panels do this automatically, and the check shows how many strings your record uses.
mx
or
ptr
term may resolve are not checked, and macros such as
%{i}
are not expanded.
www.
is removed from the input; enter other subdomains in full.
An SPF record checker validates a domain TXT record that starts with v=spf1. It parses mechanisms such as include, ip4, ip6, a, mx, redirect, and all so you can understand the authorized mail sender policy.
RFC 7208 caps SPF evaluation at 10 DNS-querying mechanisms, including include, a, mx, ptr, exists, and redirect. Nested includes count toward the same budget; exceeding it causes a PermError.
Start with ~all while confirming every legitimate sender is listed, then move to -all when ready. SPF alone does not guarantee inbox placement, so pair it with DKIM and DMARC alignment.
Publishing more than one v=spf1 TXT record creates a PermError. Merge all authorized senders into a single SPF record using mechanisms such as include, ip4, ip6, a, and mx.