SPF checker

Check that your SPF record is valid and stays under the 10-lookup limit, including everything its includes pull in.

Enter a domain or address to check.

Free, no account needed.

One line that lists your senders

SPF is a single TXT record listing the servers allowed to use your domain as the envelope sender, and checking it may take no more than 10 DNS lookups across all its includes.

Read moreShow less: One line that lists your senders

SPF (Sender Policy Framework) is a single TXT record at your domain that lists the servers allowed to send mail using your domain in the envelope sender, the hidden return address that bounces go to. A receiving server compares the connecting IP address with the list and gets one of a handful of answers: pass, fail, softfail, neutral or none, or an error if the record can't be evaluated.

A typical record reads left to right:

v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all
  • v=spf1 marks the TXT record as SPF. Exactly one record on the domain may start this way.
  • include: pulls in another domain's SPF record, which is how you authorise a whole service such as Google Workspace or a newsletter platform.
  • ip4: and ip6: list addresses or ranges directly. a and mx authorise the addresses of your own A or MX records.
  • ~all at the end says what happens to everyone else: ~all is softfail ("probably not us"), -all is fail ("definitely not us").

The catch is the lookup limit. Evaluating SPF may involve at most 10 mechanisms that cost a DNS query, counted across the whole chain of includes: every include, a, mx, ptr and exists, plus a redirect. Plain ip4, ip6 and all are free. Go over 10 and the receiver stops with a "permerror", so SPF can't pass for mail you meant to authorise, and some receivers reject the message outright. RFC 7208 also limits "void" lookups, names that return nothing, to two.

Reading our SPF result

The result tells you whether the record works and how many of the 10 allowed lookups it spends, and Technical details adds the published record, the counts and an include tree.

Read moreShow less: Reading our SPF result

The summary states whether the record works and how many lookups it uses, for example "SPF is set up correctly and uses 7 of its 10 allowed lookups." The main finding repeats the count as "7 of 10 DNS lookups used", or names the problem.

Open Technical details for three things:

  1. The record itself, exactly as published.
  2. A count line: DNS lookups: 7 of 10 · void lookups: 0 of 2 · ends with -all.
  3. The Include tree. The top line is your domain with the lookups its own record spends; each include sits beneath its parent with "(include)", its own lookup count and its full record, so you can see which service uses up the budget. Problems inside a branch, such as an include that doesn't exist, are marked on that line.

Four records checked on 21 October 2026

Real SPF records for google.com and wikipedia.org at one lookup each, cloudflare.com at 7 and github.com right at the limit of 10.

Read moreShow less: Four records checked on 21 October 2026

google.com keeps it minimal: v=spf1 include:_spf.google.com ~all. One lookup; the include holds only IP ranges, so it costs nothing further.

wikipedia.org works the same way with its own list: v=spf1 include:_cidrs.wikimedia.org ~all, one lookup.

cloudflare.com combines two ip4 ranges with six includes (Google, Mailchimp, Mandrill, Zendesk, Statuspage and Salesforce) and ends with -all. Total: 7 of 10 (six includes plus one exists inside Salesforce's record).

github.com uses exactly 10 of 10. Its own record has eight includes (Microsoft 365, two Google netblock lists, Zendesk, Salesforce, Mailchimp, Marketo and SendGrid). Salesforce's record adds one more through an exists mechanism, and SendGrid's adds one by including ab.sendgrid.net. Ten is still within the limit, so this passes, but adding any further service that needs a lookup would push it over.

Errors and the record to publish

Google's and Microsoft's own values for a new record, and fixes for duplicate records, too many lookups, a loose or missing all, ptr, and includes or names that return nothing.

Read moreShow less: Errors and the record to publish

No SPF record. Publish one TXT record at the bare domain (host @). For Google Workspace alone, Google's value is v=spf1 include:_spf.google.com ~all. For Microsoft 365 alone, Microsoft's is v=spf1 include:spf.protection.outlook.com -all. If you send through both, combine them into one record.

Two SPF records. Receivers return a permerror for every message, so SPF never passes, which is at least as bad as having no record. Merge them into a single line (illustrative example):

Before:  v=spf1 include:_spf.google.com ~all
         v=spf1 include:sendgrid.net ~all
After:   v=spf1 include:_spf.google.com include:sendgrid.net ~all

Too many DNS lookups. Remove includes for services you no longer use first; they are the usual cause. Replace a and mx with the server's actual ip4: address if it rarely changes. Move a bulk mail service to a subdomain, such as news.example.com, with its own SPF record. Microsoft asks customers not to replace its include with copied IP addresses ("flattening"), because the ranges change.

+all or a bare all. This authorises every server on the internet. Change it to ~all or -all.

?all or no all at all. Both leave unlisted servers "neutral", which receivers must treat exactly like having no SPF, so SPF gives no protection against forgeries. End the record with ~all or -all.

Uses the ptr mechanism. The SPF standard says not to publish it: it's slow, and unreliable when DNS has problems. Replace it with the server's ip4: or ip6: address.

An include points at a domain with no SPF record. That alone is a permerror, and our result shows it as "SPF record has errors". It's usually a service you've left; remove that include.

More than two void lookups. Names in a, mx, exists or include terms that don't exist or return no records. Remove those terms.

SPF questions

Short answers on multiple records, which terms count toward the limit, ~all or -all, subdomains, domains that never send and records over 255 characters.

Can I have multiple SPF records?

No. A domain may publish only one TXT record that begins v=spf1; with two, receivers return a permerror and SPF can never pass. Put all the mechanisms into a single record.

Does ip4 count toward the 10-lookup limit?

No. ip4, ip6 and all need no DNS query, so they're free. include, a, mx, ptr, exists and redirect each cost one, including the ones inside nested includes.

Should I use ~all or -all?

Both tell receivers to distrust servers you haven't listed; -all says it more firmly. Google recommends ~all for Workspace and Microsoft recommends -all for Microsoft 365. Once DMARC is at quarantine or reject, receivers follow the DMARC policy, so having one of them matters more than which. Some receivers do reject on -all before checking DMARC, which can lose forwarded mail that DKIM would have saved; ~all avoids that.

Does SPF apply to subdomains?

No. Each name is checked against its own SPF record, so mail sent as news.example.com needs a record at news.example.com. DMARC is different: a domain's DMARC policy covers subdomains that have none of their own.

Does a domain that never sends email need SPF?

Yes, and it's the easiest record to write: v=spf1 -all says no server sends for the domain. Pair it with a DMARC record at p=reject so nobody can use the parked name for convincing forgeries.

Can an SPF record be longer than 255 characters?

The record can, but each string inside it can't. Split a long record into several quoted strings in one TXT record; receivers join them back together without adding spaces, so put a space at the end of one piece or the start of the next.

Related pages

SPF is one of five things the health check tests at once, next to DKIM and DMARC, which decide whether an SPF pass counts.

Guide: SPF's 10-lookup limit.