SPF checker: validate an SPF record and count its DNS lookups
Check a domain's SPF record: one record or two, how it ends, and how many of the ten DNS lookups it uses.
This tool only reads public DNS or runs in your browser. It does not spend verification credits.
What this checker does
Enter a domain. The checker fetches its TXT records, finds the one that starts v=spf1, and reads it the way a receiving mail server would. It then follows every include and redirect to count how many DNS lookups the record costs in total.
It reports four things:
- Whether there is exactly one SPF record. Two is a permanent error, and the most common way a working setup breaks when a new tool is added.
- How the record ends.
~alland-allare both fine.+allauthorizes the whole internet.?allsays nothing. - How many of the ten lookups are used, and which include spends them.
- Deprecated or ignored parts, such as the
ptrmechanism or anything written afterall.
It is free and does not spend credits. It only reads public DNS.
The ten-lookup limit, in practice
SPF allows a receiver at most ten DNS lookups while evaluating one record. include, a, mx, exists, ptr and redirect each cost one, and an include also costs whatever is inside the record it points to. ip4 and ip6 cost nothing.
That is why the count surprises people. include:_spf.google.com is one term in your record, but it expands to several more lookups inside Google's own records. Add a CRM, a help desk and a sequencer and a record that looks short is over the limit. Past ten, the receiver returns a permanent error and SPF fails for every message, including the ones from servers you listed correctly. See the SPF lookup limit.
The "Where the lookups go" table in the result shows each include and what it costs, so you can see which service to remove or replace.
Check the right domain
SPF is evaluated against the domain in the envelope sender, also called the Return-Path, not the From address a reader sees. If your sending platform uses its own Return-Path domain, the SPF record that matters for that mail is theirs, and yours is not consulted at all. SPF is also not inherited: mail.yourdomain.com needs its own record.
When it is the wrong tool
A passing SPF record does not mean mail is authenticated as you. DMARC needs SPF or DKIM to pass and match the From domain. Check DKIM and DMARC too, or look at all three at once with the deliverability checker. To build a record from scratch, use the SPF generator.
None of this helps if the list is bad. Authentication proves who sent the mail. It does not stop a hard bounce from an address that does not exist.
Frequently asked questions
- How do I check if my SPF record is valid?
- Look up the TXT records on your domain and find the one that starts with v=spf1. It is valid when there is exactly one, it ends in ~all or -all, and evaluating it needs no more than ten DNS lookups. This checker tests all three.
- What happens if I have two SPF records?
- SPF returns a permanent error and fails for every message. A domain may publish only one record that starts with v=spf1. Merge the includes from both into a single record.
- How many DNS lookups does my SPF record use?
- Each include, a, mx, exists, ptr and redirect costs one lookup, plus whatever is inside each included record. The limit is ten in total. This checker follows every include and shows the count and where each lookup goes.
Related
- Free SPF record generator: build your SPF record online
Build a v=spf1 TXT record from the providers you actually send through.
- DKIM checker: look up a DKIM record by selector
Find a domain's DKIM key, by selector or by trying the common ones, and check its size and status.
- DMARC checker: read a domain's DMARC policy
Look up a DMARC record and see what the policy does, where reports go, and what weakens it.
- SPF lookup limit — cold email glossary
SPF allows a maximum of ten DNS lookups per check. Nested includes count. Going over makes SPF fail even when the sending IP is authorised.