SPF Record Checker — Validate SPF & Lookup Count

Check a domain’s SPF record: syntax, the all policy, every nested include and the total DNS lookups counted against the RFC 7208 limit of 10.

What is SPF?

SPF (Sender Policy Framework) is a DNS TXT record that lists the servers allowed to send email for your domain. Receiving servers compare the connecting IP address with your SPF record; if it is not listed, the message fails SPF and is more likely to be rejected or sent to spam.

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

Since February 2024, Gmail and Yahoo require SPF (or DKIM) for all senders and both — plus DMARC — for bulk senders.

The 10 DNS lookup limit

SPF evaluation may trigger at most 10 DNS lookups. Every include, a, mx, ptr, exists and redirect counts — including the ones inside included records. Exceed it and receivers return a PermError, which most treat as an SPF failure. This checker expands every include recursively and shows exactly where your lookups are spent.

Reading the result

  • -all — hard fail: unlisted servers should be rejected.
  • ~all — soft fail: accept but mark suspicious. The usual safe default.
  • ?all — neutral: provides no protection.
  • +all — allows anyone to send as you. Never use it.

Common SPF errors and fixes

  • Multiple SPF records — a domain must publish exactly one. Merge them: v=spf1 include:a include:b ~all.
  • Too many lookups — remove services you no longer use, replace a/mx with ip4 ranges, or move bulk mail to a subdomain with its own SPF.
  • Include without SPF — an include that returns no SPF record is a “void lookup” and causes a PermError. Check the include hostname with your provider.
  • SPF passes but mail still fails DMARC — SPF checks the hidden Return-Path domain, not the visible From. Make sure your sending service uses a custom return-path on your domain, or rely on aligned DKIM.

Frequently asked questions

Enter your domain above. The checker fetches the TXT record that starts with v=spf1, validates every term, follows all includes and reports the lookup count and any errors.

Your record needs more than 10 DNS queries to evaluate once includes are expanded. Receivers stop and treat SPF as failed. Remove unused includes, use ip4:/ip6: instead of a and mx, or split senders across subdomains.

Start with ~all. Once DMARC reports confirm every legitimate sender passes, you can move to -all. With an enforced DMARC policy (quarantine/reject), the difference matters less because DMARC decides the outcome.

No. Two v=spf1 records cause a PermError and SPF fails for every message. Combine all mechanisms into a single record.