ZoneProbe
Resolver

SPF Record Checker

Check a domain's SPF record: syntax, the full include tree, how many of the 10 allowed DNS lookups it uses, and whether it actually protects the domain. Enter a domain above and choose Run check.

Recent lookups

What is an SPF record?

SPF (Sender Policy Framework, RFC 7208) is a TXT record that lists the servers allowed to send email for a domain. When a message arrives, the receiving server looks up the SPF record of the domain in the envelope sender (the Return-Path) and checks whether the connecting IP address is on the list.

A typical record for a company that uses Microsoft 365 and a newsletter service looks like this:

v=spf1 include:spf.protection.outlook.com include:servers.mcsv.net -all

SPF on its own only checks the hidden envelope sender, not the From address people see. To stop spoofing of the visible From address you also need DMARC, which ties SPF and DKIM to the From domain.

How to read the results

  • SPF record found: the domain publishes exactly one TXT record starting with v=spf1. Two or more SPF records is an error: receivers treat the result as PermError, which usually means SPF fails.
  • DNS lookups used: every include, a, mx, exists, ptr and redirect costs one DNS lookup, including the ones inside included records. The limit is 10. Over 10, SPF returns PermError for every message, so ZoneProbe warns from 8 onwards.
  • The "all" ending: -all (fail) and ~all (soft fail) both protect the domain once DMARC is enforcing. ?all gives no protection, and +all lets any server in the world send as the domain.
  • Include tree: each include is expanded, so you can see which service uses up the lookups.
  • Terms: every mechanism in the record, with what it matches.

Common SPF problems and how to fix them

Too many DNS lookups (more than 10)

This is the most common SPF failure, and it builds up quietly as services are added. To fix it:

  • Remove includes for services you no longer use.
  • Replace a and mx with the ip4: or ip6: ranges they point to, if those addresses rarely change. ip4 and ip6 cost no lookups.
  • Send bulk or marketing mail from a subdomain, such as news.example.com, with its own SPF record.

"Flattening" (replacing includes with the IP addresses they currently resolve to) also works, but the record breaks silently when the provider changes its addresses, so it needs to be kept up to date automatically.

Multiple SPF records

Adding a second v=spf1 record for a new service is a frequent mistake. Merge them into one record, keeping every include and a single all at the end.

Include loops and broken includes

An include that points to a domain with no SPF record, or that doesn't exist, makes the whole evaluation fail. A loop, where a record includes one of the records that included it, fails too. ZoneProbe shows the chain so you can see where it goes wrong. Including the same domain twice from different places isn't a loop, but each copy still counts toward the limit.

Mail from a service isn't covered

If a sending service (a CRM, helpdesk or invoicing tool) isn't in the record, its mail can fail SPF. Add the include the provider documents, or have it send with its own envelope domain and sign with DKIM for your domain.

SPF mechanisms at a glance

TermLookupsMatches when
ip4:203.0.113.0/240the sender's IPv4 address is in the range
ip6:2001:db8::/320the sender's IPv6 address is in the range
a, a:host1the sender is one of the host's A or AAAA addresses
mx1 (plus up to 10 address lookups for the MX hosts)the sender is one of the domain's mail servers
include:domain1, plus its ownthe other domain's SPF record passes
redirect=domain1uses the other domain's record instead (only if no all)
-all / ~all0everything else: fail or soft fail

Frequently asked questions

Should I use -all or ~all?

With DMARC set to quarantine or reject, both work, because DMARC decides what happens to failing mail. ~all is the safer choice while you're still finding all the services that send for you; -all is stricter and fine once the record is complete.

Do subdomains inherit the SPF record?

No. SPF is checked against the exact domain in the envelope sender. A subdomain that sends mail needs its own record, and one that never sends mail can publish v=spf1 -all.

How long does an SPF change take to work?

As long as the old record's TTL, typically a few minutes to an hour. You can watch the change reach resolvers with the DNS propagation checker.

What is a void lookup?

A lookup that returns no answer or a domain that doesn't exist. RFC 7208 recommends that receivers allow at most two per evaluation and return PermError beyond that. Void lookups usually come from includes for services you've stopped using.

Does a domain that never sends email need SPF?

Yes. Publish v=spf1 -all together with a DMARC policy of p=reject, so nobody can send convincing mail using the domain.

In-depth guides

Related tools

Email Header Analyzer

Paste the full headers of a message below, then choose Analyze (Ctrl+Enter).
Outlook: open the message → File → Properties → Internet headers.   Gmail: ⋮ → Show original.
Headers are analysed in this browser only. Nothing is sent anywhere or saved.