SPF record checker

Look up a domain's SPF record, follow every include, count DNS lookups against the limit of 10 and catch the mistakes that make SPF fail.

SPF
Try:

The full include tree and lookup count appear here.

SPF mechanisms

MechanismMatchesLookup?
ip4:203.0.113.0/24That IPv4 address or rangeNo
ip6:2001:db8::/32That IPv6 rangeNo
include:_spf.google.comWhatever that domain's SPF allowsYes
a / mxThe domain's A/AAAA or MX hostsYes
redirect=other.comUse another domain's SPF entirelyYes
-all / ~allEverything else: fail / softfailNo

Over the limit? Remove includes for services you no longer use, replace a/mx with explicit ip4 ranges, or send bulk mail from a subdomain with its own SPF.

Questions people ask

What is an SPF record?
A TXT record starting v=spf1 that lists which servers may send email for your domain (RFC 7208). Receivers compare the sending server's IP with the list and use the result, together with DKIM and DMARC, to decide whether to trust the message.
What is the 10 DNS lookup limit?
Evaluating SPF may trigger at most 10 DNS-querying mechanisms (include, a, mx, ptr, exists, redirect), counted recursively through includes. Exceed it and the result is PermError, which DMARC treats as a failure. ip4, ip6 and all are free.
~all or -all?
-all (fail) tells receivers to reject mail from unlisted servers; ~all (softfail) says treat it as suspicious. With DMARC enforcing, ~all is the common, safe choice; +all allows anyone and should never be used.
Can I have two SPF records?
No. Multiple v=spf1 records on one name cause a PermError. Merge them into one record with multiple includes.