What does an SPF record checker test?
An SPF record checker looks up the TXT record that starts with v=spf1 on a domain and tests it against the rules in RFC 7208, the SPF standard. SPF (Sender Policy Framework) is a DNS record that lists the servers allowed to send email for a domain.
This tool runs five tests on the record it finds:
| Test | Passes when | Why it matters |
|---|---|---|
| Record exists | One TXT record starts with v=spf1 | With no record, receivers cannot tell your servers from a forger's |
| Only one record | Exactly 1 SPF record is published | Two records return a permanent error and SPF fails for all mail |
| Lookup count | 10 or fewer DNS lookups, counted through every include | The 11th lookup returns a permanent error |
| Ending | The record ends in -all or ~all | +all authorizes every server on the internet |
| Syntax | Every mechanism is one the standard defines | A typing error invalidates the whole record |
How do you read an SPF record?
An SPF record is read left to right, and the first mechanism that matches the sending server decides the result. Here is a typical record for a company that sends from Google Workspace and one marketing platform:
v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.25 ~all
| Part | Meaning | DNS lookups |
|---|---|---|
v=spf1 | Marks the record as SPF version 1 | 0 |
include:_spf.google.com | Also allow the servers listed in that domain's SPF record | 1, plus any inside it |
ip4:203.0.113.25 | Allow this one IPv4 address | 0 |
a and mx | Allow the domain's own A or MX hosts | 1 each |
~all | Soft fail everything else: accept it, but treat it as suspect | 0 |
-all | Hard fail everything else | 0 |
Why does SPF fail with "too many DNS lookups"?
SPF fails with a permanent error when checking the record needs more than 10 DNS lookups. Section 4.6.4 of RFC 7208 sets that limit so one email cannot make a receiving server run unlimited queries.
The mechanisms include, a, mx, exists, ptr and the redirect modifier each cost one lookup. Lookups inside an included record count too. include:_spf.google.com alone costs 4, because Google's record includes three more.
This is the most common SPF fault we repair. A company adds a CRM, a help desk, a marketing platform and a billing tool, each with its own include, and passes 10 without noticing. Mail keeps sending. SPF quietly stops passing.
The fixes, in the order we try them:
- Remove includes for tools you no longer use. Most records carry at least one.
- Move a bulk sender to its own subdomain, for example
news.example.com, with its own SPF record. - Replace an include with the
ip4ranges it resolves to, only when the provider publishes fixed ranges.
Be careful with "SPF flattening" services that rewrite every include into IP addresses. Providers change their ranges without notice, and a flattened record goes stale the day they do.
Why can SPF pass and email still land in spam?
SPF passing does not mean a message reaches the inbox. SPF checks the hidden envelope sender, called the Return-Path, and not the From address a person sees. A marketing platform can pass SPF for its own bounce domain while your visible From domain is never checked.
That gap is what DMARC closes. DMARC requires the domain that passed SPF or DKIM to match the visible From domain. Run the DMARC checker on the same domain, and the DKIM checker for the signing key. SPF also breaks on forwarding, because the forwarding server is not in your record, which is why DKIM matters as much.
Past authentication, placement depends on sender reputation, complaint rates and list quality. None of those are visible in DNS. Our guide to why emails go to spam walks through all five checks a message faces.
How do you fix an SPF record?
Fix an SPF record by editing the TXT record at your DNS host, never by adding a second one. Follow these steps:
- List every service that sends mail as your domain: mailboxes, marketing, CRM, billing, support.
- Get each one's SPF include from its documentation.
- Write one record starting with
v=spf1, the includes, then~all. - Check the lookup count with this tool before you save it.
- Publish it, wait for the DNS TTL to pass, then check again.
If the record needs more than 10 lookups, or mail is still landing in spam after SPF passes, that is the work we do. See what an email deliverability audit covers, or run the full email deliverability test to check MX, SPF, DKIM, DMARC, MTA-STS and BIMI together.