About the SPF Checker
This SPF checker resolves a domain's TXT records, isolates the one starting with v=spf1, and parses it mechanism by mechanism: include, a, mx, ip4, ip6, ptr, exists and redirect. It counts the mechanisms that trigger their own DNS lookup against the RFC 7208 ceiling of 10, since a record that goes over that limit does not just look messy, it fails outright with a permerror the moment a receiving mail server evaluates it. It also reads the all qualifier at the end of the record so you can see at a glance whether unauthorized senders are soft-failed, hard-failed, or waved through.
Use it whenever you add a new sending provider and need to check the record still fits under the lookup budget, when a message is bouncing or landing in spam and you suspect SPF is the cause, or as a first pass before setting up DMARC, since DMARC's SPF alignment only means anything once the underlying record is correct. Sender Policy Framework exists to tell receiving servers exactly which machines are allowed to send mail as your domain, and a broken record either blocks legitimate mail or leaves the door open to spoofing.
The lookup runs on our server against public resolvers and reads only the TXT record your domain already publishes, which is public DNS data by definition. Nothing about the domain you enter is stored or logged beyond serving that one result, and no email is sent or read. That is also why this is a good first stop before the DMARC checker and the composite mail-deliverability tool: SPF is usually the record that changes most often as you add or drop sending providers, and it's the easiest one to quietly break.
How to use it
- Enter the domain you send mail from and submit.
- The tool resolves the domain's TXT records and pulls out the one that starts with v=spf1.
- Read the parsed mechanism list to see every include, a, mx, ip4/ip6, exists and redirect entry in order.
- Check the DNS-lookup count against the limit of 10; going over means the record will hit a permerror in production.
- Confirm the all qualifier at the end matches your intended policy, typically ~all while testing and -all once confirmed clean.
- Fix any warning, such as a second SPF record or a missing all mechanism, then re-run to confirm a clean result.
- Move on to the DMARC and DKIM checkers so the full authentication stack is verified, not just SPF on its own.
Examples
- v=spf1 include:_spf.google.com ~all -> Google Workspace as the sole sender, one DNS lookup, soft-fail default.
- v=spf1 include:sendgrid.net include:_spf.google.com include:spf.protection.outlook.com include:mailgun.org ~all -> four providers stacked, four lookups counted at the top level, still under 10 but each include's own record adds more downstream.
- v=spf1 +all -> flagged immediately: this authorizes any server on the internet to send as the domain.
- Two separate TXT records that both start with v=spf1 on one domain -> flagged as invalid, RFC 7208 permits exactly one.
- v=spf1 a mx include:_spf.google.com -all -> three lookup-triggering mechanisms (a, mx, include) with a hard-fail policy.
- A domain with no v=spf1 TXT record at all -> flagged so mail can be forged as that domain with no SPF check to catch it.
Which mechanisms count toward the 10-lookup limit
RFC 7208 caps SPF evaluation at 10 mechanisms that require their own DNS lookup, specifically to stop a single mail delivery from turning into an unbounded chain of queries against the receiving server. Not every mechanism costs a lookup though, and mixing the two up is the single most common reason a record looks short but still fails.
- include: counts, it fetches and evaluates another domain's SPF record, usually the biggest contributor
- a and a:domain count, each resolves the domain's A/AAAA records
- mx and mx:domain count, and can cost more than one lookup if the domain has several MX hosts
- ptr and ptr:domain count, and RFC 7208 itself discourages this mechanism as slow and unreliable
- exists: counts, typically used with macros for existence checks against a constructed hostname
- redirect= counts, it hands off evaluation to another domain's record entirely
- ip4: and ip6: do not count, a literal address needs no lookup to evaluate
- all does not count, it is the final catch-all qualifier, not a lookup mechanism
Why the lookup count here is a floor, not a ceiling
This checker counts the mechanisms written directly in your domain's own record. It does not recursively open every include's record and add up what that record itself spends, because that would mean resolving an unbounded chain of third-party domains on every check. RFC 7208's real 10-lookup limit is evaluated recursively across the whole chain a receiving server actually walks, so three includes that look cheap in this tool's count can easily push you over the limit once each provider's own SPF record, which often nests further includes for its own infrastructure, is added in. If a domain sends through several providers and the total looks close to 10, check each included provider's own record depth as well, not just what shows up here.
Qualifier reference
The character in front of all sets what a receiver should do with mail that fails every other mechanism.
- -all: hard fail. Tells receivers to reject unauthorized senders outright. The target state for a mature, fully mapped record.
- ~all: soft fail. Marks unauthorized mail as suspicious but most receivers still accept it. The common default while a new sender is being verified.
- ?all: neutral. Explicitly states no policy either way. Rare, and provides no real protection.
- +all: pass. Authorizes literally any server to send as the domain. Effectively disables SPF and should never appear in production.
Mistakes this checker flags
- Two SPF records on one domain: invalid per RFC 7208, receivers may reject the mail or pick unpredictably between them.
- Adding a new provider's include without removing an old one, quietly pushing the record past 10 lookups.
- Leaving ~all in place indefinitely instead of moving to -all once every legitimate sending path is confirmed.
- Copying +all from an old tutorial or forum post, which disables the protection SPF exists to provide.
- Assuming a subdomain inherits the parent's SPF record. It does not. Mail.example.com needs its own v=spf1 record if it sends mail.
Frequently asked questions
What is an SPF record?
SPF (Sender Policy Framework) is a TXT record published in DNS that lists which mail servers are allowed to send email for a domain. Receiving servers check the sending IP against this list before deciding how much to trust the message.
Why do I keep getting a permerror for too many DNS lookups?
RFC 7208 caps SPF evaluation at 10 mechanisms that trigger a DNS lookup (include, a, mx, ptr, exists, redirect). Once the real recursive count, across every included record, exceeds that, SPF evaluation aborts with a permerror and typically fails closed.
What is the difference between ~all and -all?
~all is a soft fail: unauthorized senders are marked suspicious but usually still delivered. -all is a hard fail: receivers are told to reject unauthorized senders. +all authorizes everyone and should never be used.
Can a domain have two SPF records?
No. RFC 7208 requires exactly one v=spf1 TXT record per domain. Publishing two makes evaluation ambiguous, and many receivers will treat the domain as having a permanent error rather than picking one.
Do ip4 and ip6 mechanisms count toward the 10-lookup limit?
No. A literal IP address mechanism needs no DNS lookup to evaluate, so ip4: and ip6: entries are free. Only mechanisms that resolve something, include, a, mx, ptr, exists and redirect, count against the limit.
How do I lower my SPF lookup count?
Replace an include with the direct ip4/ip6 ranges it resolves to if the provider publishes them, drop includes for services you no longer use, and consolidate providers where possible. Flattening trades a lookup for a longer but static record.
Does SPF alone stop someone from spoofing my domain?
Not completely. SPF only checks the sending server's IP against the envelope-from domain, and it breaks under simple forwarding. DMARC ties SPF and DKIM results together with alignment and tells receivers what to actually do on failure.
Do subdomains inherit the parent domain's SPF record?
No. SPF is evaluated per hostname. If mail.example.com sends mail directly, it needs its own v=spf1 TXT record. Example.com's record does not automatically cover it.
Why does my SPF record look correct here but mail still fails authentication?
Common causes are a second, conflicting SPF record elsewhere, the actual sending IP not being covered by any mechanism, or the lookup limit being exceeded once nested includes are counted, which this tool does not fully resolve on its own.
Is this SPF lookup private?
Yes. The check runs on our server against public DNS resolvers and reads only the TXT records your domain already publishes. Nothing you enter is stored beyond returning that one result.