Help center
How to check an SPF record and fix common errors
Look up a domain's SPF record with dig or a free checker, count its DNS lookups against the limit of 10, and fix duplicate records, +all and missing senders.
Updated 2026-11-23
Read the domain's TXT records and find the one that starts with v=spf1. Then check three things: there is exactly one, it stays within 10 DNS lookups, and it ends with -all or ~all, never +all. The free SPF checker does all of this in one step.
What the record says
An SPF record lists the servers allowed to send mail for the domain:
v=spf1 include:_spf.mailprovider.example ip4:192.0.2.10 -all
SPF checks the envelope sender, the address used in SMTP MAIL FROM, not the From header people see. SPF, DKIM and DMARC explained shows how the three records fit together.
Free way
- Open the SPF checker and enter the domain. It parses each mechanism, counts lookups against the limit and flags errors such as several records or
+all. - Or query DNS yourself:
dig +short TXT example.com
nslookup -type=TXT example.com
- Find the line that starts with
v=spf1. Other TXT records, such as site verification strings, are unrelated.
With the API
The email endpoint tells you whether a domain publishes SPF:
curl https://api.qelka.com/v1/email \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "jane@example.com", "mode": "fast"}'
It costs 1 credit. Read:
{
"domain": { "name": "example.com", "spf": true, "dmarc": true }
}
| Field | Meaning |
|---|---|
domain.spf |
true when the domain publishes an SPF record (RFC 7208). Null when it was not checked. |
It reports that a record exists, not that it is correct. Use the free checker for the contents. A domain that publishes SPF and DMARC is managed deliberately, which says nothing about a mailbox. See the email reference.
Read the ending
| Ending | Meaning |
|---|---|
-all |
Fail everything not listed. The usual choice once the record is complete. |
~all |
Soft fail: accept but mark. Useful while you find all your senders. |
?all |
Neutral. Gives no protection. |
+all |
Accept everyone. Never use it. |
Fix common errors
- Two records. Merge into one, listing every sender.
- More than 10 lookups. Remove unused providers. Each
include,a,mx,ptr,existsandredirectcounts, with nested ones. - Missing sender. Add the provider's
include:and test again. Mail sent through it fails SPF until you do. - Typo in a mechanism. An unknown mechanism is a permanent error. Compare with the provider's guide.
- Record on the wrong name. SPF lives on the domain you send from, not on
_dmarcor a selector name.
DNS changes take up to the record's TTL to spread. Wait, then recheck.
Common mistakes
- Adding a second record for a new provider. Add an
include:to the existing one. - Ending with
+allto stop bounces. It lets anyone send as you. - Counting only the visible includes. Nested lookups count too.
- Expecting SPF to protect the visible From address. That is DMARC's job. See Set up DMARC.
- Checking SPF on the wrong domain. Subdomains used for sending need their own record.
Related
Frequently asked questions
How do I check if a domain has an SPF record?
dig +short TXT example.com lists them. The free SPF checker does the same and also parses each mechanism and counts lookups. The email endpoint reports domain.spf as true when a record is published, but it does not judge whether the record is correct.What is the SPF 10 lookup limit?
Can a domain have two SPF records?
Put this check in your product
Get an API key in under a minute. 100 free credits every month, no card required.
- 100 free credits a month
- No card
- Test keys spend nothing
- Cancel any time