SPF Record Checker
Validate your SPF record and count DNS lookups against the 10-lookup limit.
Enter a domain to fetch its SPF record, expand every include: it
references, and count the DNS lookups the whole tree requires. The lookup count is
the part that matters most — and the part almost no one checks until mail starts
failing.
You also get the parsed record term by term, with any syntax errors, deprecated mechanisms and dangerous settings called out explicitly.
How it works
SPF (Sender Policy Framework) is a DNS TXT record listing which servers may send mail using your domain. A receiving server looks it up, checks whether the connecting server is authorised, and uses the answer as one input to its spam decision.
The 10-lookup limit is where most SPF records break. RFC 7208
§4.6.4 caps evaluation at ten DNS-querying terms, counted across the entire
recursive tree — every include, a, mx,
ptr, exists and redirect, including those
inside the records you include. Exceed it and the result is
permerror: receivers may treat SPF as failing entirely, and your
legitimate mail starts landing in spam.
The trap is that this happens gradually. Each new service — a CRM, a helpdesk, a
newsletter tool — adds one more include:, and each of those may itself
contain several lookups. A record that reads as five includes can easily cost
twelve lookups. Nothing warns you; mail simply starts failing.
The other decision is how the record ends:
-all(hardfail) — anything not listed is unauthorised. The strongest setting, and the goal.~all(softfail) — treat unlisted senders as suspicious but accept. The safe default while you confirm every legitimate sender is listed.?all(neutral) — no opinion, and therefore no protection.+all— authorises the entire internet to send as your domain. Strictly worse than publishing nothing.
One more rule that catches people: a domain may publish exactly one SPF record. Two records is a permanent error, and receivers will not pick one for you.
Frequently asked questions
What happens if I exceed 10 DNS lookups?
Receivers return permerror, and most treat that as SPF failing. Your legitimate mail loses SPF authentication, which usually means more spam-foldering — and if DMARC is set to reject with only SPF alignment, outright rejection.
How do I reduce the number of lookups?
Remove includes for services you no longer use — this is usually the biggest win. Replace an include with the explicit ip4/ip6 ranges it resolves to, since those cost no lookups. Drop any ptr mechanism. If you are still stuck, consider an SPF flattening service, accepting that flattened records go stale when providers change IPs.
Should I use ~all or -all?
Start with ~all while you confirm every legitimate sender is listed, then move to -all. Going straight to -all before you are certain risks rejecting your own mail — from an application server or an invoicing tool you forgot about.
Can I have two SPF records?
No. RFC 7208 permits exactly one, and publishing two is a permanent error — receivers will not choose between them. If you need to authorise more senders, merge everything into a single record.
Does SPF alone stop people spoofing my domain?
No. SPF validates the envelope sender, not the From: address a recipient actually sees, so it can be bypassed. You need DMARC on top, which ties authentication to the visible From: domain and tells receivers what to do on failure.
Why does SPF break when mail is forwarded?
Forwarding relays the message from a server that is not in your SPF record, so SPF fails at the final destination. This is a known limitation and the reason DKIM matters — DKIM signatures survive forwarding, so DMARC can still pass.
Related tools
SPF Generator
Build a valid SPF record and see its DNS lookup cost before you publish it.
EmailDMARC Checker
Look up and validate your DMARC record, and see what it actually protects.
EmailDKIM Checker
Find and validate your DKIM public key, with automatic selector discovery.
EmailMX Lookup
Find where a domain's email is delivered, with priorities and provider detection.
EmailEmail Header Analyzer
Trace an email's path, time each hop, and read its SPF/DKIM verdicts.
EmailDNS Lookup
Query A, AAAA, MX, TXT, NS, SOA, CNAME, SRV and CAA records for any domain.
DNS & DomainNeed hosting that just works?
Free SSL, daily backups and 24×7 support on every Loudhost plan.