HomeBlogHow to Check SPF Records — Step-by-Step Guide (2026)
Security 8 min read

How to Check SPF Records — Step-by-Step Guide (2026)

Learn how to check SPF records for any domain in seconds. Understand what the results mean, how to spot common SPF errors, and how to fix them. Includes manual lookup commands and a free SPF checker tool.

goodboycoder
goodboycoderFounder
Founder of FreeMailTools
Published 2026-08-08

What Is an SPF Record?

An SPF (Sender Policy Framework) record is a DNS TXT record that lists the mail servers authorized to send email on behalf of your domain. When a mail server receives an email claiming to be from your domain, it looks up your SPF record to check whether the sending server is on the authorized list.

If the sending server is not listed, the receiving server can mark the message as suspicious, send it to spam, or reject it outright — depending on how the receiving server is configured.


How to Check an SPF Record

Method 1: Free SPF Checker Tool (Fastest)

Use our SPF Checker. Enter your domain and you'll immediately see:

  • Whether an SPF record exists
  • The full raw record
  • DNS lookup count (must stay below 10)
  • Include chain expansion
  • Any syntax errors
  • A plain-English explanation of what the policy means

Method 2: Command Line (dig)

bash

Look for a TXT record starting with v=spf1. If you have multiple TXT records, filter for SPF:

bash

Method 3: Command Line (nslookup)

text

Method 4: PowerShell (Windows)

powershell

Reading an SPF Record

Here's a typical SPF record:

text

Tag breakdown

PartMeaning
v=spf1SPF version — always spf1
include:_spf.google.comAuthorize all IPs in Google's SPF record
include:sendgrid.netAuthorize all IPs in SendGrid's SPF record
ip4:203.0.113.5Authorize a specific IPv4 address
~allSoftFail — everything else is suspicious

SPF Qualifiers

QualifierSymbolMeaning
Pass(none or +)Authorized — deliver the message
Fail-Not authorized — reject
SoftFail~Not authorized — mark as suspicious
Neutral?No policy — deliver normally

The 10 DNS Lookup Limit

This is the most common SPF problem. The SPF specification (RFC 7208) allows a maximum of 10 DNS lookups when resolving an SPF record. Every include:, a:, mx:, ptr:, and exists: mechanism counts as a lookup.

If your record causes more than 10 lookups, the SPF check returns a PermError, which behaves like a fail.

Example problem:

text

Each include: may trigger multiple sub-lookups inside the included record. Five include: statements can easily exceed 10 total lookups.

Solution: Use our SPF Flattener to resolve all includes into direct IP addresses, reducing lookup count to 1.


Common SPF Errors

Multiple SPF records

Only one SPF TXT record is allowed per domain. If you have two, both will be ignored and SPF will return PermError.

text

Using -all too aggressively

Starting with -all (hard fail) before you've confirmed all legitimate senders are in the record will cause delivery failures. Start with ~all (soft fail) while auditing.

Forgetting sending services

If you use a marketing platform (Mailchimp, HubSpot, Klaviyo) or transactional email service (SendGrid, Postmark, Mandrill), their sending servers must be authorized in your SPF record.

Overly broad IP ranges

Authorizing entire /16 IP ranges (ip4:203.0.0.0/16) when you only use one specific IP gives attackers a large attack surface. Use the smallest necessary IP blocks.


What Happens When SPF Fails?

When SPF fails, the outcome depends on:

  1. Your SPF all qualifier-all vs. ~all vs. ?all
  2. The receiving server's policy — each mail server decides how to handle SPF failures
  3. Your DMARC policy — DMARC can override SPF outcomes with a clear policy

Without DMARC, a SPF failure alone may not result in rejection. DMARC is required to enforce a consistent policy across receiving mail servers.


goodboycoder

Written by goodboycoder

Founder of FreeMailTools

goodboycoder is the Founder & Lead Developer of FreeMailTools. Building 100% free, developer-first tools for email authentication (SPF, DKIM, DMARC), DNS inspection, disposable temporary inboxes, and deliverability optimization.

Test Your Domain Setup Live

Run real-time SPF, DKIM, DMARC, and DNS lookups on your own domain with 100% free developer tools.

Explore Tools

Related Guides & Comparisons

Tools Comparison

Top 10 Best Free Email Tools for Developers & Marketers (2026)

A hands-on roundup of the best free tools for email validation, DNS authentication, deliverability testing, spam analysis, and temporary inboxes — with real links.

Security

SPF vs DKIM vs DMARC: What Each Does and Why You Need All Three

A technical breakdown of the three email authentication standards — SPF, DKIM, and DMARC — what each protects against, how they interact, and how to set them up correctly.