Check your SPF record and its 10-lookup limit

Type your domain. We read its SPF record, follow every include, count the DNS lookups against the limit of 10 and tell you what to fix.

Free, no sign-up · 30 checks a day

How to use the SPF checker

  1. 1. Type your domain

    The domain in your From address, e.g. your-store.com.

  2. 2. See who may send

    One sentence names the services your SPF allows, and what happens to everyone else.

  3. 3. Check the count

    The tree shows every include and how many of the 10 DNS lookups each one uses.

What SPF does

SPF (Sender Policy Framework) is a TXT record on your domain that lists the servers allowed to send mail for it. When a message arrives, the receiving server looks at the address it came from, reads your SPF record and checks whether that server is on the list.

A record looks like this: v=spf1 include:_spf.google.com include:klaviyomail.com ~all. Each include: hands the question to another record, usually your email provider's. The all at the end says what to do with every server not on the list.

The ending: -all, ~all, ?all

  • -all (fail): mail from any other server should be rejected. The strictest setting.
  • ~all (softfail): accept it, but mark it as suspicious. The usual choice, and safe while DMARC does the enforcing.
  • ?all (neutral): say nothing. Barely better than no record.
  • +all: anyone may send as you. Never use it.

With DMARC at quarantine or reject, ~all is fine: DMARC decides, and a softfail keeps a forwarded message from bouncing outright.

The 10-lookup limit

SPF allows at most 10 DNS lookups while a record is evaluated. Every include:, a, mx, ptr, exists: and redirect= costs one, and so does everything inside the records they point to. Google Workspace alone uses about 4; add Microsoft 365, a newsletter tool, a helpdesk and an invoicing service and you are over the limit without noticing.

Past 10 lookups the result is a permanent error, and receivers treat SPF as failed for every message, including the legitimate ones. Mail still arrives when DKIM passes, but you have lost half of your DMARC protection.

This checker follows every include, counts each lookup and shows where they come from, so you can see which service is the expensive one.

How to get back under 10

  • Remove includes for services you no longer use. Old records collect them for years.
  • Replace a/mx with ip4: or ip6: entries when the addresses rarely change: IP ranges cost no lookups.
  • Send marketing mail from a subdomain (news.your-store.com) with an SPF record of its own.
  • Check whether a service signs with DKIM on your domain instead: many ESPs pass DMARC through DKIM alone, so their include is not needed.

Avoid "SPF flattening" services that copy every IP into your record unless they keep it updated for you: when the provider adds a server, flattened records go stale silently.

After every change, run the check again. DNS answers are cached for a while, so give a new record a few minutes. Keep a note of why each include is there, so the next person can tell which ones are still in use.

There is a second limit that fewer tools check: at most two lookups may come back empty (a "void" lookup, such as an include of a domain that no longer exists). A third one is also a permanent error.

Other mistakes the checker catches

  • Two SPF records on the same domain: both are ignored. Merge them into one.
  • An include that points to a domain with no SPF record, often a typo or a provider that changed its name.
  • A record with no all at the end, which says nothing about other servers.

SPF checks the hidden Return-Path address, not the From line people see. DMARC compares the two, so check your DMARC and DKIM next.

Monitor this daily

Know your domain passes Gmail and Yahoo's rules. Sender health →

Start free

Questions

Why does my SPF pass in one tool and fail in Gmail?

Usually the lookup limit: a few tools stop counting at the first level, Gmail does not. Our count follows every nested include.

Do I need Shopify in my SPF?

Shopify Email sends from Shopify's own domain unless you set up your domain for it; then Shopify gives you the records to add. Klaviyo and most ESPs work the same way.

Can I have two SPF records?

No. Two records make SPF fail with a permanent error. Put every include in one record.

Should I use -all or ~all?

With DMARC at quarantine or reject, ~all is enough and gentler on forwarded mail. Without DMARC, -all gives SPF itself teeth.

More free tools

  • Email verifier

    One address: deliverable, risky or undeliverable, and why.

  • DMARC checker

    Reads a domain's DMARC record, explains the policy and gives the fix.

  • DKIM checker

    Finds a domain's DKIM keys (common selectors tried) and checks each one.

  • Blocklist checker

    Checks an IP or a domain against Spamhaus and other public blocklists.

  • Spam test

    Send a campaign to a test address and get its spam score and what to fix.

  • Subject line tester

    A score out of 100, what to fix first and the checks behind it.

  • DMARC generator

    Builds a DMARC record step by step, with each choice explained.