SPF Checker

Look up the SPF record of your domain, see if it is valid, and read what every part of it means. No jargon, no account.

What is an SPF record?

SPF, short for Sender Policy Framework, is a line of text in your domain's DNS that lists which servers are allowed to send email for your domain. Your mailbox provider, your newsletter tool, your app: each one that sends as @yourcompany.com has to be on that list.

When an email arrives, the receiving server reads your SPF record and checks whether the server that sent it is on the list. If it is not, the email looks like a forgery, and it is far more likely to end up in spam.

A typical SPF record looks like this: v=spf1 include:_spf.google.com include:sendgrid.net ~all. The checker above takes yours apart line by line and tells you what each part does.

How to read your SPF record

Every SPF record is a list of rules, read from left to right.

  • `v=spf1` opens every SPF record. Without it, the record is ignored.
  • `include:` allows the servers of another service, like include:_spf.google.com for Google Workspace. This is how most email tools are added.
  • `ip4:` and `ip6:` allow a specific server address or range, for servers you run yourself.
  • `a` and `mx` allow the servers your domain already points to, for the website and for incoming mail.
  • `~all` or `-all` closes the record and says what to do with everyone else: mark it as suspicious (~all) or reject it (-all). Never +all, which allows the whole internet.

The SPF 10 DNS lookup limit

This is the error that breaks the most SPF records, usually without anyone noticing. To check an email, a receiving server may follow at most 10 DNS lookups. Every include:, a, mx, exists and redirect counts as one, and so do the includes inside each include.

Add a few email tools and you pass 10 fast. Past the limit, receivers return an error called permerror, and SPF fails for every email you send, even from services that are listed.

The checker counts every lookup for you, nested ones included. If you are over, remove the services you no longer use, or replace an include: with the ip4: ranges it stands for when they rarely change.

Common SPF errors and how to fix them

Most SPF problems come down to one of these.

  • Two SPF records. A domain may only have one. When you add a service, edit the existing record to add its include:; do not create a second record. Two records make SPF fail entirely.
  • Missing `all` at the end. Without it, the record says nothing about servers that are not listed. End it with ~all.
  • `+all` or `?all`. The first allows anyone to send as you; the second protects nothing. Use ~all or -all.
  • A typo in an include. An include that points to a domain without an SPF record is an error for receivers. Copy includes exactly as your provider gives them.
  • The `ptr` mechanism. It is deprecated, slow, and some receivers ignore it. Replace it with ip4: ranges or the include your provider offers.

SPF is one of three records

SPF on its own is not enough. Gmail and Yahoo ask senders to have SPF, DKIM and DMARC in place, and DMARC only passes when SPF or DKIM matches the domain in your From address.

Check the other two with our free DKIM Checker and DMARC Checker, or all three at once with the Deliverability Setup Checker.

FAQ

SPF Checker: questions, answered

How do I check my SPF record?
Enter your domain above. The checker reads its SPF record from public DNS, validates it, counts its DNS lookups and explains every part of it.
Should my SPF record end with ~all or -all?
Both are fine. ~all marks mail from unlisted servers as suspicious, -all asks receivers to reject it. With DMARC in place, receivers mostly follow your DMARC policy anyway, so ~all is the safer default while you are still adding services.
Can I have two SPF records?
No. A domain must have exactly one SPF record. With two, receivers treat SPF as broken for every email. Merge them into one record that includes every service.
What happens if my SPF record has more than 10 lookups?
Receivers stop at 10 and return a permanent error, so SPF fails for all your email. Remove services you no longer use or replace some includes with the IP ranges they contain.
Does a subdomain need its own SPF record?
Yes. SPF is not inherited: news.yourcompany.com needs its own record if it sends email. Enter the subdomain above to check it.
How long does an SPF change take to work?
Usually a few minutes, sometimes a few hours depending on your DNS host and the TTL of the old record. The checker queries public resolvers directly, so it sees the change as soon as they do.

Turn your signups into customers with email

Connect Supabase and Stripe, let your agent draft your first flow, and send your first 1,000 emails for free.

Start with 1,000 free emails