SPF Record Checker

Check a domain's SPF record, follow every include and see how many DNS lookups it really needs. Anything that would break the record is listed first, with the reason and the fix.

What this SPF checker shows

Enter a domain and the checker reads its TXT record that starts with v=spf1. It then walks through the record the way a receiving mail server does, following every include and redirect and looking up each a and mx mechanism. You get the raw record, the number of DNS lookups against the limit of 10, the all setting at the end and a short note on each term. Included records open underneath the include that pulls them in, so you can see where the lookups come from.

How to check an SPF record yourself

The box above is the quickest way. To look from your own computer, remember that SPF is an ordinary TXT record on the domain, so any DNS tool can show it. On Windows:

nslookup -type=txt google.com 8.8.8.8

On macOS or Linux:

dig +short TXT google.com

The line you want starts with v=spf1. When we ran these on 3 December 2026 it read v=spf1 include:_spf.google.com ~all. The 8.8.8.8 in the Windows command asks Google's public resolver. It matters: without it, the same command failed on the network we tested from, most likely because google.com publishes a long list of TXT records.

A command like this only shows the top record. The real work is opening the include, then any includes inside it, and adding up the lookups, which is what the checker does for you.

How SPF decides whether a server may send

SPF (Sender Policy Framework) is a list, published in DNS, of the servers that may send mail for a domain. When a message arrives, the receiving server takes the domain of the envelope sender, also called the Return-Path or bounce address, fetches that domain's SPF record and looks for the connecting IP address in it. The answer is pass, fail, softfail, neutral or none, or one of two errors: temperror for a temporary DNS problem and permerror for a record that cannot be used at all.

SPF looks at the envelope sender, not the From address people see in their inbox. Those can be different domains, especially when a newsletter or billing service sends for you. Tying the two together is the job of DMARC, so once SPF passes, run the DMARC record checker on the same domain. Our guide to SPF, DKIM and DMARC shows how the three work together.

The parts of an SPF record

TermWhat it matchesCosts a DNS lookup?
ip4, ip6One address or a range, such as ip4:192.0.2.0/24No
aThe addresses of the domain itself, or of a host you nameYes
mxThe domain's incoming mail serversYes
includeThe servers listed in another domain's SPF recordYes, plus every lookup inside that record
existsMatches when a name has an A record, mostly used with macrosYes
ptrThe reverse DNS name of the sender. The standard says not to publish itYes
redirect=Hands the decision to another domain's recordYes
allEverything not matched earlier, always lastNo

Each mechanism can carry a qualifier in front of it: + for pass (the default when nothing is written), - for fail, ~ for softfail and ? for neutral. In practice only the all at the end carries one.

SPF too many DNS lookups: the limit of 10

RFC 7208, the SPF standard, allows at most 10 terms that need a DNS query during one check. include, a, mx, ptr, exists and redirect count once each, including every one that sits inside an included record. ip4, ip6 and all cost nothing. If a check needs more than 10, the receiver has to stop and return permerror, which many treat like a failure.

This is how real records look. We ran five well-known domains through the checker on 3 December 2026:

DomainDNS lookups usedEnds with
google.com1~all
salesforce.com4~all
microsoft.com6-all
paypal.com9~all
github.com10~all

The last one has no room left. One more include, or one extra lookup added by a provider inside its own record, would take it over the limit. Records usually get there slowly: a newsletter tool, then a help desk, then a CRM, each with its own include. Providers also change their records without telling you, which is why the checker counts what is published right now.

There is a second limit that fewer people know. The standard says receivers should allow no more than two "void" lookups, meaning queries that return nothing, and give permerror after that. The usual causes are an include for a service you cancelled long ago or a typo in a domain name.

Ways to get back under the limit:

  • Remove what you no longer use. Old includes for a former email host or a cancelled marketing tool are the easiest lookups to win back.
  • Use ip4 and ip6 where addresses are stable. Your own servers' fixed addresses cost nothing. Replace a provider's include with its address ranges only if the provider promises those ranges will not change.
  • Move a sender to a subdomain. A newsletter tool sending as news.example.com gets its own SPF record with its own count of 10.
  • Drop a and mx when they add nothing. If your mail servers are already covered by an include, mx only costs a lookup.

~all or -all?

The all at the end decides what happens to mail from servers you did not list. -all asks receivers to fail it, ~all asks them to accept it but treat it with suspicion, ?all gives no opinion and +all approves every server on the internet, which makes the record pointless. Never publish +all.

Once your DMARC policy is set to quarantine or reject, receivers mostly act on the DMARC result, and the gap between ~all and -all becomes small. Some receivers still reject an SPF fail straight away, before DMARC is even considered, which can bounce forwarded mail. That is one reason many large senders keep ~all together with an enforced DMARC policy. A domain that sends no mail at all should publish v=spf1 -all.

SPF errors this checker finds

  • Two SPF records on one domain. Only one v=spf1 record is allowed. With two, receivers return permerror, so merge them into one.
  • More than 10 lookups, or more than 2 void lookups. Both lead to permerror, as described above.
  • An include that leads nowhere. If the included domain has no SPF record, because of a typo or a closed service, the whole check ends in permerror.
  • A misspelled mechanism. ipv4: instead of ip4: is not skipped quietly: receivers return permerror for the entire record.
  • An equals sign where a colon belongs. include=_spf.google.com is the sneaky one. Receivers read it as an unknown setting and ignore it without any error, so the provider's servers are simply not authorised.
  • Terms after all. Mechanisms written after all are never read, so a server added at the end of the record is not authorised.
  • The record is on the wrong domain. SPF is checked for the envelope sender, which is often a bounce domain of your email provider rather than your own. The email header analyzer shows the Return-Path of a real message, so you know which domain to check.

Questions about SPF records

Where do I publish my SPF record?

As a TXT record on the domain itself, which most DNS panels call @ or leave blank in the host field. It must start with v=spf1. After you save it, a TXT check on our DNS propagation checker shows when resolvers around the world can see it.

Can a domain have two SPF records?

No. A domain may publish exactly one TXT record that starts with v=spf1. If there are two, receivers return permerror and SPF stops working for all of your mail. Combine the mechanisms of both into a single record.

What happens when SPF fails?

That depends on the receiver and on your DMARC policy. A softfail usually adds to the spam score, while a fail can lead to rejection. If DKIM passes and aligns with the From domain, DMARC can still pass, so the message may be delivered normally.

Does SPF work when an email is forwarded?

Usually not. The forwarding server's address is not in your record, so SPF fails at the final destination. DKIM signatures normally survive forwarding, which is one reason to set up both.

How long does a new SPF record take to work?

Resolvers may keep the old record cached until its TTL runs out, which is often between five minutes and a few hours. If the domain had no SPF record before, a resolver that looked recently can remember that empty answer for the negative caching time in your zone's SOA record, often up to an hour.