Skip to content

SPF checker and lookup counter.

Type your domain and see your SPF record, how many DNS lookups it uses out of the allowed 10 and the include tree behind it.

Check only domains you own or have permission to check. By using it you accept the Terms of Service and the Privacy Policy.

What an SPF record does

SPF is a DNS record that lists the servers allowed to send email for your domain. When a message arrives, the receiving server looks at your SPF record and checks that the sending server is on the list.

Every service that sends mail for you (your mail provider, a newsletter tool, your invoicing app) usually adds an include to the record. That is how an SPF record grows until it breaks.

How to read your result

The all at the end says what to do with servers that are not on the list: -all rejects them, ~all marks them as suspicious and +all lets everyone in, which defeats the purpose. Lookups shows how many DNS queries receivers need to evaluate the record.

The include tree shows where each lookup comes from. Each include, a, mx, ptr, exists and redirect counts as one, and every include can bring its own. The count here is recursive, like a receiving server's.

SPF “too many DNS lookups” (permerror)

The SPF standard allows at most 10 DNS lookups per check. Above that, the receiver returns a permanent error (permerror) and treats SPF as failed, even if the record looks right. Your real emails can then land in spam or be rejected.

It usually happens after adding too many services. This checker counts them for you and shows which include is responsible, so you can decide what to remove.

Read the full guide: SPF permerror: what 'too many DNS lookups' means and how to fix it

How to reduce SPF lookups

Remove includes of services you no longer use. Replace a, mx and ptr terms with explicit ip4 or ip6 ranges when the addresses are stable, because ip4 and ip6 don't count as lookups.

Flattening (replacing includes with the IP ranges they resolve to) cuts lookups but needs upkeep, because providers change their addresses. If you do it, use a service that keeps it updated automatically.

Common SPF mistakes

Two SPF records on the same domain: receivers ignore both. Merge them into one. A +all at the end, which authorizes any server. The ptr mechanism, which is slow and discouraged. An include that points to a domain that no longer has an SPF record.

Also watch for a missing record on a domain that sends mail, and for services added to the record that never send as your domain.

Frequently asked questions

What is the SPF 10 DNS lookup limit?
RFC 7208 limits SPF evaluation to 10 DNS lookups. If a check needs more, the result is a permanent error (permerror) and the SPF check fails.
Which SPF terms count as a lookup?
include, a, mx, ptr, exists and the redirect modifier each count as one, and so does every lookup inside an included record. ip4, ip6 and all don't count.
Should I use -all or ~all?
-all tells receivers to reject mail from servers that are not listed, and ~all marks it as suspicious. With DMARC in place, either works. Start with ~all if you are not sure your list is complete.
Can I have two SPF records?
No. A domain must publish a single SPF record. If there are two, receivers ignore them and SPF fails. Merge them into one record.
Why does my SPF fail when it looks right?
The most common causes are going over 10 lookups, a second SPF record, a typo in an include and sending from a service that is not in the record. The checker above shows the first three.
Is SPF flattening safe?
It can be, if the flattened record is refreshed automatically. A static copy of a provider's IP addresses goes stale when the provider changes them, and then real mail starts failing.

Learn more

Sources