New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
Domains and DNSUpdated 18 Oct 2026

SPF Record Check: How to Test Your SPF Record and Fix Common Errors

Three ways to check an SPF record, what to look for in the result, which domain SPF evaluates, the most common errors with fixes, how to read SPF results and a routine for every change.

SQ
Written by Sana Qureshi
Email Compliance Specialist
Reviewed by Daniel Whitfield
  • Published9 Jun 2026
  • Read time6 min
  • Length1,241 words
Share this guide

An SPF check answers one question: is the server that sent this message allowed to send for this domain? People search for "SPF record check" in two situations. Either they have just published or changed an SPF record and want to confirm it works, or mail is landing in spam or bouncing and they suspect SPF. This guide explains how to check an SPF record properly, what to look for in the result, the errors that appear most often (more than one record, too many lookups, a missing include, the wrong qualifier at the end) and how to fix each. It also covers the difference between checking the record as published and checking what actually happened to a real message, because a record can look fine and still fail for a particular email. We do not invent the include values of any provider. For a sending service, copy the SPF include from your dashboard; for your mailbox suite, use its own documentation. If you want the full syntax first, read SPF record explained.

Two checksthe published record, and the result on a real message
One recorda domain must publish a single SPF TXT record
Ten lookupsSPF evaluation stops with an error past the lookup limit

How to check an SPF record

Method 1: command line

dig TXT example.com +short
nslookup -type=TXT example.com

Look for the line that starts with v=spf1. If there are two lines that start that way, that is already your problem. If there are none, the domain has no SPF record at that name.

Method 2: an online checker

Online tools fetch the record and follow its includes to show the full evaluation, including the lookup count. Our free SPF, DKIM and DMARC checker shows the record and flags common errors. Any checker shows the record as seen from its own resolver at that moment, so a very recent change may not appear yet.

Method 3: a real message

The most reliable check is to send a message and read the result in the headers. Look for the Authentication-Results header and the line starting spf=. It tells you whether SPF passed, failed, softfailed or returned an error, and for which domain. This tells you what the receiver actually concluded, including effects of forwarding and the domain used in the envelope. See how to read email headers.

What to check in the result

CheckWhat good looks like
Number of SPF recordsExactly one at the name
Version tagStarts with v=spf1
IncludesEvery service that sends as this domain is listed or covered
DNS lookup countAt or below the limit of 10
Ending qualifierMatches your intent, such as ~all or -all
SyntaxNo typos, stray spaces, curly quotes or missing colons
HostnamePublished at the domain used in the envelope sender, which may be a subdomain

Which domain does SPF check?

SPF evaluates the domain in the envelope sender (also called the return-path or MAIL FROM), not the address people see in the From header. When you send through a service, the envelope sender is often a domain the service controls, so SPF can pass for the service's domain while not aligning with yours. DMARC then relies on DKIM for alignment, or on a custom return-path that you set up. See DMARC alignment and custom return-path domains. This is the reason a "pass" in an SPF checker does not always mean DMARC passes.

Common SPF errors and fixes

More than one SPF record

Two v=spf1 records on the same name cause a permanent error. This usually happens when a second service says "add this TXT record" and someone adds it instead of merging. Combine all mechanisms into one record, for example one line that includes each sender once. See SPF with multiple senders.

Too many DNS lookups

Mechanisms such as include, a, mx, exists and redirect trigger DNS lookups, and nested includes count too. Past 10, the result is a permanent error, which receivers may treat as a failure. Remove services you no longer use, replace broad mechanisms with narrower ones and move some senders to a subdomain. See fixing SPF PermError.

A sender is missing

If the check passes in a tool but a particular service fails in practice, that service's sending addresses are not covered. Add the include that service documents. For our service, use the SPF include shown in your dashboard domain settings.

Wrong ending

The final mechanism says what to do with senders that did not match. -all asks receivers to reject them, ~all asks them to treat them as suspicious and ?all and +all do not protect you. Never publish +all. Many domains use ~all while still discovering senders and enforce with DMARC. Choose deliberately.

Syntax and formatting problems

Stray quotes, non-breaking spaces from copying a web page, a missing space between mechanisms or a typo in include make the record unparseable. Retype suspicious parts in a plain-text editor. See TXT record formatting rules.

Record at the wrong name

If you send from mail.example.com, the SPF record that matters is at mail.example.com for envelope domains on that name, not necessarily the one at the root. Check the name that appears in the headers.

Changes not visible

Cached answers can show the old record until the TTL expires. Query the authoritative nameserver directly. See TTL and propagation.

Reading SPF results

ResultMeaningTypical cause
passThe sending IP is authorisedCorrect setup
failThe IP is explicitly not authorisedSender missing from record while ending in -all
softfailNot authorised, but treat with suspicionSender missing while ending in ~all
neutralNo assertion madeRecord ends in ?all
noneNo SPF record foundNot published, or wrong name
permerrorThe record cannot be evaluatedTwo records, syntax error or too many lookups
temperrorA temporary DNS problemResolver or nameserver trouble; usually clears

A short routine for every change

  1. Edit the single existing SPF record rather than adding another.
  2. Look it up, count the lookups and check the ending.
  3. Send a test message from each sender and read the SPF result in the headers.
  4. Check DMARC alignment as well, because SPF passing for another domain does not help.
  5. Record who owns each include so that you can remove it later.

When you start sending through our SMTP relay or email API, the SPF and DKIM values come from your dashboard. See authenticating your sending domain.

Checking SPF for a subdomain and for several domains

If you send from a subdomain, check the record at that subdomain as well as at the root. A subdomain does not inherit the SPF record of its parent; if it publishes none, SPF returns none for mail whose envelope sender uses that name. Teams that manage many domains benefit from a repeatable routine: list each domain that sends, check its SPF record, count the lookups, confirm the ending and record the date. Automate the check where you can and run it after every DNS change. For domains that never send, publish a record that authorises no one, so spoofed mail fails immediately. See protecting parked and non-sending domains.

Finally, treat SPF as one of three checks, not the whole story. A passing SPF result helps, but receivers weigh DKIM, DMARC, sending reputation, content and recipient engagement too. If authentication is clean and mail still lands in spam, move on to reputation rather than adjusting the record again.

Test your SPF record in seconds Run the free checker, then send a test message and read the SPF result in the headers.

Open the checker

References and further reading

Frequently asked questions

How do I check my SPF record?

Look up the TXT record starting with v=spf1 using dig or nslookup, use an online checker, and confirm the result on a real message by reading the Authentication-Results header.

Why does my SPF check pass but DMARC fail?

SPF checks the envelope sender domain, which may belong to your sending service. DMARC needs the passing domain to align with your From domain, so use DKIM alignment or a custom return-path.

What does SPF permerror mean?

The record cannot be evaluated. Common causes are two SPF records at one name, a syntax error or more than 10 DNS lookups.

Can I have two SPF records?

No. A name must have a single SPF record. Merge the mechanisms of all senders into one.

Should I end my SPF record with -all or ~all?

Both are valid. Dash-all asks receivers to reject unauthorised senders and tilde-all asks them to treat those as suspicious. Choose deliberately and never use +all.

Topics#spf#spf check#dns#email authentication#permerror#troubleshooting
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales