SPF Record Checker & Lookup Tool: Validate Syntax, Lookups, and Sender IPs

Check any domain's Sender Policy Framework (SPF) record or validate a draft policy before publishing. Trace nested include chains over DNS-over-HTTPS (DoH), count total and void DNS lookups against the 10-lookup limit, and test any sending IP.

Try:
10-Lookup Tree · Void Check · Sender IP
Sample example.com Illustrative policy
1 / 10 lookups 0 / 2 voids SoftFail (~all)
SPF record mechanisms, lookup costs, and plain-English details
Term Type Source Details
v=spf1 version example.com Declares this TXT record as an SPF email authorization policy (0 lookups)
[1] include:_spf.example.com mechanism (DNS) example.com Evaluates the SPF policy published at _spf.example.com (1 lookup + nested terms)
ip4:192.0.2.0/24 mechanism example.com Authorizes that literal IPv4 CIDR block to send mail (0 lookups)
~all mechanism example.com SoftFail: marks mail from unlisted servers suspicious without hard rejection
100% Free · No Sign Up Live Domain + Draft Sandbox 🛡️ Browser DoH · Nothing Stored by Us
10-Lookup Tree + Sender IP Test

What your SPF check result means: all 7 evaluation states

Under the official Sender Policy Framework specification (IETF RFC 7208), every SPF check resolves to one of seven evaluation states from the Domain Name System (DNS) text (TXT) record and sending server IP.

All seven official SPF evaluation states, their cause, mail receiver behavior, and next step
SPF state Condition observed How mail receivers act Next action
1. Pass (+) Single valid v=spf1 record within 10 lookups and 2 void lookups; sending IP matches an authorized mechanism Accepts the SPF check as authorized for the envelope sender domain Keep total recursive lookups at 7 or fewer for headroom and re-check after vendor edits.
2. Fail (-all) Sending IP did not match an authorized term and reached a hard-fail mechanism (typically -all) Marks the sender unauthorized; receivers may reject the message or route it to spam Verify whether the IP belongs to a real sender; if so, add that sender before keeping -all.
3. SoftFail (~all) Sending IP reached a soft-fail qualifier (~all) without matching an earlier rule Usually accepts the message for inspection while flagging SPF as failing Recommended transition setting while auditing senders through DMARC reports.
4. Neutral (?all or no all) Policy ends in ?all or omits both all and redirect= Treats the sender as neither authorized nor forbidden Replace ?all with ~all or -all so unauthorized senders cannot pass unchallenged.
5. None Domain resolves without errors, but publishes zero TXT records starting with v=spf1 (not a PermError) Records no SPF policy; mail relies solely on other signals and fails SPF checks Publish one v=spf1 record listing real senders, or publish v=spf1 -all on non-sending domains.
6. TempError Transient DNS failure (timeout or SERVFAIL) interrupted the lookup Defers delivery temporarily with a 4xx Simple Mail Transfer Protocol (SMTP) response for retry Treat as inconclusive, retry the check, and verify authoritative nameserver health.
7. PermError Over 10 DNS lookups, over 2 void lookups, multiple v=spf1 records, circular loop, missing include policy, or bad syntax Aborts SPF evaluation permanently so the policy fails even for authorized IPs Fix the structural error flagged in the checker immediately and re-verify before sending.

Beyond the seven standard outcomes, the checker also surfaces four configuration warnings before they cause bounces: policies sitting at 8 to 10 lookups (at 10/10, zero headroom remains and an eleventh lookup triggers failure), permissive +all endings that authorize every host on the internet, deprecated ptr terms, and redirect= modifiers silently ignored alongside an all mechanism. Review every permanent failure condition in our SPF PermError guide. Major mailbox providers (including Gmail and Yahoo since February 2024, and Outlook.com since May 2025) require high-volume senders delivering 5,000 or more messages per day to pass both SPF and DomainKeys Identified Mail (DKIM) alongside a published Domain-based Message Authentication, Reporting, and Conformance (DMARC) policy; see Gmail and Yahoo bulk sender requirements for the full checklist.

How to fix SPF PermErrors and stay under 10 DNS lookups

Repair a failing or over-limit SPF record by merging duplicates, pruning unused or unaligned includes, and separating high-volume mail onto subdomains before considering static flattening.

  1. Merge duplicate v=spf1 TXT records into one entry: Combine every mechanism from multiple SPF records into a single TXT record at the same hostname, then delete the extra entries. Two v=spf1 records always cause PermError.
  2. Prune retired platforms, deprecated ptr terms, and unaligned vendor includes: Delete include: entries for services your organization no longer uses and drop any ptr rule. Verify whether each Email Service Provider (ESP) sends using your domain in the SMTP Return-Path; providers that use their own bounce domain by default waste root lookups unless you enable a custom Return-Path domain.
  3. Move distinct email streams onto dedicated subdomains: Send newsletters from news.example.com and automated alerts from mail.example.com so each subdomain gets its own fresh 10-DNS-lookup budget alongside its own SPF record.
  4. Flatten includes only as a monitored fallback: Replacing include: domains with literal ip4: and ip6: blocks drops lookup cost to zero, yet static IP lists go stale whenever a provider rotates outbound ranges unless re-checked on a schedule.
  5. Test edits in Draft mode, split long strings, and lock parked domains: Paste your revised policy into the Draft tab above before updating DNS. Split records longer than 255 characters into adjacent quoted strings inside one TXT record, tighten ?all to ~all or -all, and publish v=spf1 -all on domains that never send email.

Study the nested counting rules in our SPF 10-lookup limit guide, look up verified vendor includes in the ESP DNS settings matrix, or convert unavoidable include chains into static ranges with the SPF flattener.

Verify SPF records and include chains from the command line

Query your live TXT records and inspect each nested include: target directly from macOS, Linux, or Windows to confirm exactly what public DNS serves before and after edits.

# 1. Fetch the published SPF TXT record (macOS, Linux, Windows WSL)
dig example.com TXT +noall +answer | grep "v=spf1"

# 2. Inspect a nested include: domain manually
dig _spf.google.com TXT +noall +answer

# 3. Windows Command Prompt and PowerShell equivalents
nslookup -type=txt example.com
(Resolve-DnsName -Name example.com -Type TXT).Strings | Select-String "v=spf1"

Terminal TXT lookups show the raw quoted strings published at each hostname without running sender-IP evaluation. For a full command-line walkthrough covering all three email authentication protocols together, read How to Check SPF, DKIM, and DMARC Using dig.

SPF mechanisms, qualifiers, lookup costs, and size limits

Receiving mail servers evaluate an SPF policy strictly from left to right, stopping on the first matching mechanism while counting six DNS-querying terms recursively against the shared 10-lookup and 2-void-lookup caps.

How nested SPF include chains exceed the 10-DNS-lookup limit versus splitting mail streams onto subdomains Top track shows example.com combining four vendor includes whose nested sub-includes total 11 DNS lookups, causing SPF PermError. Bottom track shows splitting marketing mail onto news.example.com so both domains stay comfortably below the 10-lookup ceiling. example.com All vendors at apex Workspace (3) + Outlook (2) CRM (4) + Marketing (2) 11 / 10 Nested total SPF PERMERROR example.com (corporate) Workspace (3) + Outlook (2) 5 / 10 lookups · PASS (5 headroom) news.example.com CRM (4) + Marketing (2) 6 / 10 lookups · PASS (4 headroom) Each subdomain receives its own independent 10-DNS-lookup budget while keeping provider-maintained includes live
Nested include chains share one 10-DNS-lookup budget at the apex, whereas splitting high-volume senders onto a subdomain gives each stream its own 10-lookup budget.
SPF mechanisms, modifiers, DNS lookup costs, and operational rules
SPF term What it matches DNS lookup cost Operational notes
v=spf1 Version prefix declaring the TXT record as an SPF policy 0 lookups Required first token; publish in standard TXT records (obsolete DNS Type 99 SPF records must not be used).
ip4: / ip6: Literal IPv4 or IPv6 addresses and Classless Inter-Domain Routing (CIDR) ranges 0 lookups Evaluated locally with no DNS query; watch for common typos such as ipv4: or ipv6:, which cause PermError.
include: Evaluates another domain's SPF record recursively and inherits its Pass match 1 + nested terms Nested records share the parent 10-lookup cap; targeting a domain with no v=spf1 policy triggers PermError.
a IPv4 (A) and IPv6 (AAAA) addresses of the current or named hostname 1 lookup Supports optional CIDR masks (a/24 or a:mail.example.com/24//64).
mx Mail Exchanger (MX) hostnames of the domain and their resolved addresses 1 (+ up to 10 MX hosts) Counts as 1 lookup toward the 10-lookup limit with a separate cap of 10 MX host address queries; omit when cloud suites send from separate outbound IPs.
ptr Reverse DNS Pointer (PTR) hostname of the connecting IP with forward check 1 (deprecated) Deprecated, slow, and unreliable; remove ptr and replace it with explicit ip4:, ip6:, or include: rules.
exists: Matches when a constructed hostname resolves to any A record 1 lookup Usually paired with sender macros (such as exists:%{i}._spf.example.com) that require the connecting IP to expand.
redirect= Delegates the entire evaluation to another domain's SPF record 1 + nested terms Modifier only evaluated when no all mechanism is present in the same record; at most one redirect= per record.
all (- ~ ? +) Fallback rule matching every sender not matched by earlier terms 0 lookups -all hard fail, ~all soft fail, ?all neutral, +all pass everyone (never publish +all).
exp= Custom explanation TXT record fetched only when evaluation fails 0 on pass paths Rarely displayed by modern inbox providers; publishing more than one exp= modifier causes PermError.

DNS limits each individual quoted character-string inside a TXT record to 255 bytes; longer SPF records split cleanly into adjacent quoted strings (such as "v=spf1 ... include:servers." "mcsv.net ... ~all") that receivers join with zero added spaces. Keep the complete TXT DNS response at or below 450 bytes so it fits safely inside a single 512-byte User Datagram Protocol (UDP) packet without triggering TCP retries or truncation. For complete protocol background and qualifier guidance, see our SPF record guide, SPF record syntax reference, and SPF softfail vs hardfail comparison.

Verified live SPF examples (tested November 29, 2026)

Four public domains inspected live over Cloudflare DoH on November 29, 2026 show how real SPF records range from a minimal non-sending policy to a multi-string policy sitting directly on the 10-lookup ceiling:

Dated live SPF check results verified on November 29, 2026 for example.com, google.com, cloudflare.com, and github.com
Domain Observed policy summary Lookups / voids / size What it demonstrates
example.com v=spf1 -all 0/10 lookups · 0/2 voids · 11 B Minimal zero-lookup policy for a non-sending domain, rejecting every unauthorized sender cleanly.
google.com 1 include (_spf.google.com), ~all 1/10 lookups · 0/2 voids · 35 B Compact single-include tree covering 4 IPv4 and 6 IPv6 netblocks (99,584 IPv4s); sending IP 209.85.220.41 matches ip4:209.85.128.0/17 (Pass).
cloudflare.com 2 ip4: blocks + 6 includes, -all 7/10 lookups · 0/2 voids · 205 B Healthy headroom with 1 conditional sender macro, 55 IPv4 and 6 IPv6 blocks (151,326 IPv4s), and overlapping CIDR detection across two included vendors.
github.com 2-chunk split TXT + 8 includes, ~all 10/10 lookups · 0/2 voids · 383 B Valid at 10/10 with zero headroom left; demonstrates 255-byte multi-string joining (include:servers.mcsv.net) and conditional macro handling without false voids.

What this SPF record checker does not check

Live DNS inspection and local sending-IP simulation validate your published SPF policy accurately, while four message-delivery checks remain outside a browser DNS lookup:

  • Visible From: header protection: SPF authenticates the hidden SMTP envelope sender (MAIL FROM / Return-Path) and server greeting, not the visible From: address shown to recipients. Protecting the visible domain requires aligning SPF or DKIM under the updated DMARC specification (IETF RFC 9989); review how alignment works in our DMARC alignment guide.
  • Forwarded mail behavior: Automatic forwarding relays messages from the forwarding server's IP address, which breaks standard SPF unless the forwarder rewrites the envelope sender with Sender Rewriting Scheme (SRS). An aligned DKIM signature survives most forwarding hops and can independently satisfy DMARC.
  • Full SMTP session macros: Macros that depend on live connection variables beyond the sender IP (such as sender local-part %{l} or HELO hostname %{h}) are counted toward the lookup budget and flagged as conditional rather than guessed.
  • Subdomain inheritance and inbox placement: Publishing a valid SPF record at an apex domain never protects subdomains automatically, and passing SPF alone never guarantees inbox placement because mailbox filters also weigh DKIM, DMARC, IP reputation, and message content.

Auditing your SPF record syntax, nested DNS lookup count, void lookups, byte length, and sending-IP match in one pass prevents structural PermErrors from undermining outbound mail reliability. Explore our full suite of SPF, DKIM, and DMARC diagnostics under Email Authentication.

Frequently asked questions

What does "too many DNS lookups" mean in an SPF check? +

SPF evaluation allows at most 10 DNS-querying terms (include:, a, mx, ptr, exists:, and redirect=) across the evaluated policy path, including nested records pulled in by include: chains. Reaching an eleventh lookup causes receiving mail servers to stop evaluating and return PermError, failing SPF authentication for the domain.

Can a domain publish two SPF records? +

No, a domain or subdomain may publish only one TXT record starting with v=spf1. Publishing two or more v=spf1 TXT records on the same name causes receiving mail servers to abort evaluation with an immediate PermError regardless of how valid each record looks on its own. Merge all authorized senders into one v=spf1 record instead.

Should an SPF record end with ~all or -all? +

Both ~all (SoftFail) and -all (HardFail) work well alongside an enforcing DMARC policy. Use ~all while confirming every legitimate sending service in DMARC aggregate reports, and switch to -all once all real senders pass cleanly. Avoid ?all (which makes no enforcement claim) and never publish +all (which authorizes every host on the internet).

Why can SPF pass in an online checker yet fail in Gmail headers? +

A domain SPF check confirms your published syntax and lookup budget, whereas a receiving mail server evaluates the actual connecting IP address, the SMTP Return-Path domain, and any forwarding hops. Enter your server IP in the optional Sending IP field above to simulate mechanism matching, or send a test email and read its Authentication-Results header.

Do subdomains inherit the root domain SPF record? +

No, SPF records never inherit from a parent domain to its subdomains. Every subdomain used in an email Return-Path (such as mail.example.com or bounces.example.com) needs its own v=spf1 TXT record, and parked non-sending domains should publish v=spf1 -all.

Can an SPF record be longer than 255 characters? +

Yes, a single DNS TXT record can hold an SPF policy longer than 255 characters when split into adjacent quoted character-strings of 255 bytes or fewer. DNS resolvers join those quoted strings in order without adding spaces, though keeping the complete TXT reply under 450 bytes avoids UDP packet truncation.

Next checks

Last verified: 2026-12-02