SPF Checker
Free SPF checker. Look up a domain's SPF record, see every include with its DNS lookups against the limit of 10, and get each error explained.
Updated
A domain, a URL or an email address.
Enter a domain name and select Check to read its SPF record.
What Is an SPF Checker?
The SPF checker looks up a domain's Sender Policy Framework record in DNS and checks it against RFC 7208. It follows every include and redirect, counts the DNS lookups and void lookups against their limits, explains each term of the record, and names the error when receivers would return permerror. The include tree lists every record it read and the lookups each term costs.
How to Use the SPF Checker
- Enter a domain name, such as example.com. A URL or an email address works too.
- Select Check. The result says whether receivers can use the record, shows the DNS lookup count, and names what needs fixing.
- Open the include tree to see every record and the lookups each term costs, or the term list to see what each term does.
- Copy the record, or copy a link that runs the same check again.
How It Works
Finding the record. An SPF record is a TXT record on the domain that starts with v=spf1. If a domain publishes none, SPF checks return none, and if it publishes more than one, they return permerror. Receivers read a record split into several strings as if the strings were joined without spaces.
Lookups. Receivers evaluate the terms from left to right. The include, a, mx, ptr and exists mechanisms and the redirect modifier each cause a DNS lookup, and RFC 7208 limits them to 10 per check, counted across every nested include. It also asks receivers to allow at most two void lookups, queries that return no records. Going over either limit is a permerror. The checker follows each include and redirect and counts both.
Macros. A term can use macros such as %{d}, the domain being checked, or %{i}, the sending IP address. The checker expands %{d} and %{o}. A term that needs %{i} or another value known only when a message arrives is counted but not looked up.
Results. When no mechanism matches, the redirect target's record sets the result. Without a redirect or an all mechanism, the result is neutral, which receivers must treat exactly like none. A syntax error anywhere in the record makes receivers return permerror without evaluating it.
DNS. Lookups go to Cloudflare's 1.1.1.1 resolver over DNS over HTTPS in wire format, which Cloudflare recommends for critical use. The resolver's AD flag shows that every record in an answer was validated with DNSSEC.
SPF Results (RFC 7208)
| Result | Meaning |
|---|---|
| none | No SPF record exists in DNS, or the mail session gave no valid domain name to check. |
| neutral | The domain owner states nothing about whether the server is authorized. Receivers treat it exactly like none. |
| pass | An explicit statement that the server is authorized to send mail with the domain. |
| fail | An explicit statement that the server is not authorized to use the domain. |
| softfail | A weak statement that the server is probably not authorized. |
| temperror | A transient error, usually in DNS, during the check. A later retry may succeed. |
| permerror | Receivers cannot interpret the domain's published records correctly, and the DNS operator has to fix them. |
Standard
Scope
What It Checks
- +Reads the SPF record a domain publishes, and reports a domain with no SPF record or with more than one.
- +Follows every include and redirect and counts DNS lookups and void lookups against the RFC 7208 limits of 10 and 2.
- +Shows the include tree: every record read, each term in it, and the lookups it costs.
- +Explains each term of the record, marks terms after all and an ignored redirect, and names each syntax error.
- +Expands %{d} and %{o} macros and counts terms that need the sending IP without querying them.
- +Shows the result for servers the record does not list, from its all mechanism or its redirect target.
- +Shows whether the DNS answers were validated with DNSSEC.
What It Does Not Check
- -It does not test a sending IP address against the record, so it cannot say whether a given server passes.
- -It does not resolve the addresses of the mail servers an mx term finds, so it does not check their own limit of 10 address lookups.
- -It does not check DKIM or DMARC. The SPF, DMARC and DKIM checker covers all three.
- -It does not change or publish the record.
Defensive Use
SPF lets a domain owner authorize the hosts that may use the domain in the MAIL FROM identity, and receivers test every message against the published record. A record that needs more than 10 DNS lookups or has a syntax error gives permerror, so receivers cannot use it. For domains that send no mail, the UK NCSC recommends an SPF record with no permitted senders.
Frequently Asked Questions
What is an SPF Checker?→
The SPF checker looks up a domain's Sender Policy Framework record in DNS and checks it against RFC 7208. It follows every include and redirect, counts the DNS lookups and void lookups against their limits, explains each term of the record, and names the error when receivers would return permerror. The include tree lists every record it read and the lookups each term costs.
What is the SPF Checker used for?→
Finding out why SPF fails with permerror or too many DNS lookups, checking a record after adding a new email provider, and confirming which servers a domain's SPF record allows.
Is my data sent anywhere?→
The SPF Checker sends the domain name you enter to ImmunitySec servers, which run the check and return the result. To run it, they contact Cloudflare's public DNS resolver over DNS over HTTPS. Nothing else you enter leaves the page.
How is the SPF Checker used defensively?→
SPF lets a domain owner authorize the hosts that may use the domain in the MAIL FROM identity, and receivers test every message against the published record. A record that needs more than 10 DNS lookups or has a syntax error gives permerror, so receivers cannot use it. For domains that send no mail, the UK NCSC recommends an SPF record with no permitted senders.
Why does my SPF record fail with too many DNS lookups?→
RFC 7208 lets SPF evaluation use at most 10 terms that cause DNS lookups: include, a, mx, ptr, exists, and the redirect modifier. Terms inside included records count toward the same total, so one include can add several lookups. When a record needs more than 10, receivers must return permerror.
What is a void lookup?→
A DNS query that returns an answer with no records, or a name error for a name that does not exist. RFC 7208 says receivers should allow at most two void lookups per check, and going over the limit produces permerror.
What does ~all mean in an SPF record?→
~all gives servers the record does not list the result softfail, a weak statement that they are probably not authorized. -all gives fail, an explicit statement that they are not authorized. ?all gives neutral, which receivers must treat exactly like no SPF record.
Can a domain have two SPF records?→
No. When a domain publishes more than one SPF record, SPF checks return permerror. Merge the terms of both records into one.