SPF checker
The domain or address you check is used for this lookup only. It is never saved to our database or sent to our analytics.
The short answer
This SPF checker reads your domain's SPF record from public DNS, follows every include and counts DNS lookups the way receivers do. A pass means exactly one record that parses, no more than 10 lookups, no more than 2 void lookups and an ending of ~all or -all. Every problem comes with the fix.
By The Rasket Team · Last updated
What is an SPF record?
An SPF record is a TXT record at your domain that lists the servers allowed to send its mail. A receiver checks the server a message came from against that list, and the result is one of the two signals DMARC can pass on.
Receivers stop after 10 DNS lookups, so a record that needs more is a permanent error and every message fails SPF. SPF PermError and the 10 lookup limit explains what counts toward it and how to get back under it.
What is an SPF record? walks through an annotated example, the all endings and how to merge two records into one.
How to read the result
- Pass
- Receivers can read this part of your record and it does what SPF needs.
- Warning
- It works today, but it is fragile or does nothing: one more include, a term after all, or ?all.
- Fail
- Receivers fail SPF for your mail, or anyone can pass it. Fix these first, with the change shown.
- Not checked
- Part of the record could not be checked from here: a name did not answer in time, or a macro only a receiver can fill in.
Check a domain's SPF record
- 1Enter the domain. Type the domain you send from, like example.com.
- 2Run the check. Press Check SPF. Every include is followed, in seconds.
- 3Fix the fails first. Each failed row shows the change to make, and the record to publish where there is one.
- 4Check again. Once your DNS host has saved the change and its time to live has passed, run the check again.
Common problems and fixes
| Problem | Why it happens | Fix |
|---|---|---|
| Two SPF records | A second service told you to add its own v=spf1 record instead of an include. | Publish one record with every include in it. The checker shows the merged record. |
| More than 10 DNS lookups | Each include brings its own includes, and every one counts towards the limit. | Remove includes for services you no longer use, or replace a and mx with ip ranges. |
| No SPF record | The record was never published, or it was added at the wrong name. | Add one TXT record at the domain itself that starts with v=spf1. |
| +all, or no all at the end | The record was copied from an example, or the ending was left off. | End the record with ~all, or -all once every sender is listed. |
| An include with no SPF record | A service you used renamed its record, or you stopped using it. | Copy the service's current include, or remove it if you no longer use the service. |
| A misspelled mechanism | A typo such as inlcude: or ip4 written without its colon. | Correct the spelling. Receivers reject the whole record over one unknown term. |
| Two terms run together | A long record was saved as two strings and the space at the join was lost. | End the first string with a space, or let your DNS host split the value for you. |
| The record uses ptr | An old record or template still lists the ptr mechanism. | Replace ptr with the ip4 and ip6 ranges of the servers that send for you. |
How SPF relates to DKIM and DMARC
SPF checks the server a message came from. DKIM checks a signature the sender added to the message. DMARC passes when at least one of them passes for the domain in the From address, and tells receivers what to do with mail where neither does.
Our guide to DKIM, SPF and DMARC explains how the three fit together. Each has its own record to check: DMARC and DKIM.
Frequently asked questions
What is the SPF 10-lookup limit?
Receivers stop after 10 DNS lookups while checking one SPF record and fail SPF with a permanent error. Every include, a, mx, ptr and exists term counts, and so does a redirect, including those inside the records you include.
Can a domain have two SPF records?
No. With two v=spf1 records at the same name, receivers fail SPF for every message. Merge them into one record that keeps every include; the checker shows the merged record when it finds two.
What is the difference between ~all and -all?
Both say how to treat mail from servers the record does not list. ~all asks receivers to accept it but mark it as suspicious, and -all asks them to reject it. Most domains use ~all and let DMARC decide.
Why does SPF pass but DMARC fail?
SPF checks the domain in the return path, which a sending service often sets to its own domain. DMARC only counts SPF when that domain matches the one in the From address, so SPF can pass while DMARC fails.
How long does an SPF change take to show?
Public DNS keeps the old record until its time to live runs out, often an hour. This page also remembers an answer for five minutes, so wait for both before you check again.
Why does the checker say at least a number of lookups?
Part of the tree could not be followed: a name did not answer in time, or a term uses a macro that only a receiver can fill in. The count shown is what we could follow, so the real count is that or more.
Sources
2 primary sources, each read on the date shown.
See all sourcesHide sources
Keep reading
- GlossarySPFSPF is a TXT record listing which servers may send mail for a domain. A receiving server looks up the record for the return path domain and checks whether the machine that connected is on the list. It breaks when a message is forwarded, because the forwarding server is not on your list, and that is why SPF on its own is not enough.
- GlossaryDMARCDMARC tells receiving servers what to do with mail that claims to be from your domain but fails DKIM and SPF. You publish one TXT record naming a policy, none, quarantine or reject, and an address for the reports. It also demands alignment: the domain that passed authentication has to match the one a reader sees in the From header.
- GlossaryDKIMDKIM signs outgoing mail with a private key and publishes the matching public key in DNS, under a label called a selector. A receiving server fetches the key, checks the signature, and learns that the message was not altered on the way and really came from a sender your domain authorized. It survives forwarding, which is why it matters more than SPF alone.
- GuideBusiness email setup: a step-by-step guideHow to set up business email on your own domain: the four DNS records it needs, six steps with checks, switching without losing mail, and common mistakes.
- ToolSPF record generatorBuild the SPF record for your domain: list the services and servers that send your mail, see the lookup count, and copy the exact TXT record to publish.
- ToolDMARC checkerCheck your domain's DMARC record free: its policy in plain words, every tag explained, report addresses verified, and the next safe step to take.
Sending with Rasket? Add your domain and Rasket writes every record it needs, adds them for you at DNS hosts it can connect to, and checks each one until it is live. How domains work in Rasket.