Free online tool

SPF Record Checker

Look up and check the SPF record of any domain. See errors, the 10-lookup limit, every included provider and IP range, and test whether a sending IP would pass. You can also build a new record or check one before you publish it.

🔎 DNS lookups through your browser
1. What to check
2. Test a sending IP (optional)

The tool follows the SPF rules and tells you the result: pass, fail, softfail, neutral, none, permerror or temperror, and why.

3. Options

If the chosen resolver cannot be reached, the other one is tried automatically.

4. SPF record builder
Services that send email for you
Enter a domain and press “Check SPF”

You will see the record, the lookup count, problems and how to fix them.

Problems and advice

Sender test

Included records (tree)

Allowed IP ranges

Flattened record (to save lookups)

Related records

Results for several domains

Checks the public DNS. Nothing is changedNo account required · Not stored

An SPF record checker looks up the SPF record of a domain and tells you if it is correct. SPF is a short line of text in your domain’s DNS that lists who is allowed to send email for you. If it is missing, wrong, or too long, your emails can land in spam or be rejected. This free tool reads the record, counts the DNS lookups, lists every included service and IP range, points out mistakes, and tests whether a sending IP would pass.

Quick answerType your domain and press Check SPF. Look at the badge (Valid, Warnings or Problems), then at DNS lookups, which must be 10 or fewer. Read the Problems and advice list and follow each fix. Need a new record? Use the SPF record builder on the left, then press Check this record before you publish it.

Key facts at a glance

What it checksThe SPF record of a domain, a record you paste, or up to 20 domains at once.
What you seeStatus and grade, DNS lookups (limit 10), void lookups (limit 2), final policy, problems with fixes, the include tree, all IP ranges, and MX and DMARC records.
Sender testEnter an IP address and get pass, fail, softfail, neutral, none, permerror or temperror, with the reason.
ExtrasRecord builder, flattened record suggestion, CSV export, JSON report and share link.
How it looks things upDNS over HTTPS, using Cloudflare or Google. If one fails, the other is tried.
Cost and privacyFree, no account. Nothing is stored. The domain you check is sent only to the DNS resolver.
Not coveredDKIM (it needs a selector) and the deprecated ptr mechanism.
01SPF

What is an SPF record?

SPF stands for Sender Policy Framework. It is a TXT record in the DNS of your domain that lists the servers and services allowed to send email as your domain. When a mail server receives a message, it looks up your SPF record and checks whether the sending server’s IP address is on the list. The rules are defined in RFC 7208.

How SPF works A sending server sends an email to a receiving server. The receiving server asks the DNS for the SPF record of the sender's domain, compares the sending IP address with the list, and decides: pass and deliver, or fail and reject or send to spam. Sending serverInbox or spamIP 203.0.113.25sends a messagepass: deliveredfail: rejected or spam Receiving server1 asks DNS for the SPF record2 compares the sender's IP DNS of example.comv=spf1 ip4:203.0.113.0/24 -all SPF lets the receiver check: is this server allowed to send for this domain?

SPF alone does not stop every fake email, but it is one of three basic checks, together with DKIM and DMARC. Big mailbox providers expect all three, and large senders to Gmail and Yahoo have had to set them up since 2024.

02CHECK

How do I check an SPF record?

You type a domain, press one button, and read the result. The tool does the DNS work for you.

  1. Enter the domain. Type example.com. You can also paste a web address or an email address, and the tool picks out the domain name.
  2. Press “Check SPF”. The tool reads the TXT records, follows every include, and counts the lookups.
  3. Read the badge. “Valid SPF record”, “Valid, with warnings”, “Problems found”, or “No SPF record found”. A grade from A to F sits next to it.
  4. Follow the advice. Each problem has a short fix. Start with the red ones.
  5. Test a sender (optional). Open Test a sending IP, enter an IP address, and check again to see if it would pass.
TipPress Copy link after a check to get a web address that opens the same domain. It is handy for sharing a result with a colleague or a hosting support team.
03PARTS

What do the parts of an SPF record mean?

An SPF record is a list of terms, read from left to right. It always starts with v=spf1. The tool colours each term so you can read it at a glance.

Parts of an SPF record The record v=spf1 include:_spf.google.com ip4:203.0.113.0/24 tilde all, with callouts. One, the version tag. Two, an include that borrows another domain's list. Three, an IP range that is allowed. Four, the qualifier tilde, which means soft fail. Five, all, which covers every other sender. v=spf1include:_spf.google.comip4:203.0.113.0/24~all 1234 1 Version2 include3 ip4 / ip64 ~ and allSays this is an SPF record. It must come first.Also accept everything the named domain allows. It costs 1 DNS lookup or more.Accept one IP address or a range. It is free: no lookup.“all” covers everyone else. The sign in front says what to do with them.
TermWhat it doesCosts a lookup?
ip4:… / ip6:…Allows one IP address or a range.No
aAllows the IP addresses of a domain (its A and AAAA records).Yes, 1
mxAllows the mail servers of a domain (its MX records).Yes, 1
include:domainAlso allows what the other domain’s SPF record allows.Yes, 1 plus what is inside it
redirect=domainUses the SPF record of another domain instead of this one.Yes, 1 plus what is inside it
exists:namePasses if a DNS name exists. Used with macros by advanced setups.Yes, 1
ptrDeprecated. Slow and unreliable. Avoid it.Yes, 1
allMatches every sender not matched before.No
exp=…Gives an explanation text for failures.No
04RESULT

What do +, −, ~ and ? mean, and which should I use?

A sign in front of a term says what to do when that term matches. No sign means “+”. The sign in front of all matters most, because it decides what happens to senders you did not list.

The four qualifiers Plus means pass and the sender is allowed. Minus means fail and the message should be rejected. Tilde means softfail and the message is accepted but treated with suspicion, often going to spam. Question mark means neutral and nothing is said about the sender. +−~?passfailsoftfailneutralallowed sender(the default)reject the messagestrictaccept, but suspiciousoften goes to spamno opinionalmost no protection Start with ~all. Move to -all when you are sure every sender is listed. Never use +all.
EndingMeaningAdvice
-allHard fail. Others are not allowed.Best protection, once you are sure about all your senders.
~allSoft fail. Others are suspicious.A safe place to start, and common.
?allNeutral. No opinion.Gives almost no protection. Avoid.
+allEveryone is allowed.Dangerous. Anyone can send as your domain. The tool grades it F.
05LIMIT

What does “too many DNS lookups” mean, and how do I fix it?

SPF allows at most 10 DNS-querying terms in one check. These are include, a, mx, ptr, exists and redirect, and every lookup inside an include counts too. If the total goes above 10, receivers return a PermError, and your SPF is treated as broken. Terms like ip4, ip6 and all are free.

Counting DNS lookups An example record with three includes. The first include has two more includes inside it, so the lookups add up. A counter shows 6 of 10 used. On the right, a list shows that include, a, mx, ptr, exists and redirect count, while ip4, ip6 and all are free. your recordinclude:mail-a.com (1)include:x.net (1)mx (1)include:b.org (1) + 1 for “a” at the top level → total 6(4 shown + a + another include below) 6 of 10 lookups used Costs a lookupFreeinclude · a · mxptr · exists · redirectip4 · ip6 · allexp

The tool shows your total as DNS lookups: X / 10 with a bar that turns amber near the limit and red above it. If you are over, try these fixes:

  • Remove includes you no longer use. Old newsletter tools and trial services are common leftovers.
  • Replace “a” and “mx” with IP ranges if your servers never change.
  • Send from different subdomains. For example mail.example.com for newsletters. Each subdomain has its own SPF record and its own 10 lookups.
  • Flatten the record. The tool suggests a flattened record with the IP ranges written out. It saves lookups, but you must update it when a provider changes its IPs. Use it with care.
Void lookupsA void lookup is a lookup that returns nothing, such as a name that does not exist. More than 2 can also cause a PermError at some receivers. The tool shows this as Void lookups: X / 2.
06FROM

What does SPF actually check?

SPF does not check the “From” address you see in your email program. It checks the envelope sender, also called MAIL FROM or Return-Path, which is a hidden address used between mail servers. That is why SPF alone cannot stop someone from faking the visible From address. DMARC closes this gap by requiring that the two domains match.

Envelope sender and visible From An envelope shows the hidden envelope sender, bounces at mail.example.com, which SPF checks. Inside, a letter shows the visible From address, ceo at example.com, which the reader sees. DMARC compares the two domains. From: [email protected]Subject: HelloThe text of the message…visible From (what readers see) SPF checks thisMAIL FROM: [email protected] DMARC compares bothDo the two domains match?(this is called alignment)

When you use a service such as a newsletter tool, its servers often use their own domain as the envelope sender. SPF then passes for the service’s domain, not yours. Setting up DKIM for your own domain fixes the alignment. Your SPF record still needs the include for that service, so that the mail is accepted.

07BUILD

How do I build and publish an SPF record?

Open SPF record builder, tick the services that send email for you, add your own servers or IP addresses, choose the ending, and copy the result. Then press Check this record. The tool checks it as if it were already published, so you can fix problems first.

  1. List every sender. Think about your mailbox provider, your website’s contact form, your newsletter tool, your invoice or support system, and any servers of your own.
  2. Use the builder. It writes one record with the right includes, mx, a, and IP addresses, ending in ~all, -all or ?all.
  3. Check it. Press “Check this record”. Look at the lookup count and the problems list.
  4. Publish it. In your DNS host’s control panel, add a TXT record at the root of the domain (often shown as @). If a record starting with v=spf1 already exists, replace it. Never keep two.
  5. Check again. After the DNS TTL has passed (often a few minutes to a few hours), check the domain to confirm it is live.
ServiceCommon include
Google Workspaceinclude:_spf.google.com
Microsoft 365include:spf.protection.outlook.com
Amazon SESinclude:amazonses.com
SendGridinclude:sendgrid.net
Mailguninclude:mailgun.org
Mailchimpinclude:servers.mcsv.net
Postmarkinclude:spf.mtasv.net
Zoho Mailinclude:zoho.com (other regions use other names)
Salesforceinclude:_spf.salesforce.com
Zendeskinclude:mail.zendesk.com
Proton Mailinclude:_spf.protonmail.ch
Always confirmProviders can change their setup. Use the include your provider shows in its own help pages, and use this table only as a reminder. A domain that sends no email at all should publish v=spf1 -all.
08FIX

What problems does the checker find?

ProblemWhy it mattersHow to fix it
More than one SPF recordReceivers return a PermError and ignore SPF.Merge them into one record and delete the others.
More than 10 DNS lookupsPermError. SPF is treated as broken.Remove unused includes, use IP ranges, or split senders across subdomains.
+allAnyone can send as your domain.Use ~all or -all.
?all or no “all”Other senders get a neutral result, so there is almost no protection.End the record with ~all or -all.
An include with no SPF recordPermError, often from a typo or a service you stopped using.Fix the name, or remove the include.
Syntax errorFor example a wrong IP like ip4:300.1.1.1 or an unknown term. PermError.Correct the term. The tool names it.
Terms after “all”They are never read.Move “all” to the end.
redirect together with “all”The redirect is ignored.Keep only one.
The ptr mechanismDeprecated, slow and unreliable.Replace with ip4, ip6, a or include.
A very large rangeFor example ip4:10.0.0.0/8 allows millions of addresses.List only the addresses you use.
Record longer than about 450 charactersIt may not fit in one DNS response.Remove unused includes or flatten some of them.
LoopsTwo records that include each other.Remove the circular include.

The grade is a quick guide. “A” means no errors or warnings. Any error caps the grade, and “+all” or an IP range that allows every address gives an “F”.

09TEST

How does the sender test work?

Open Test a sending IP, enter an IP address, and press Check SPF. The tool then follows the SPF rules in order, exactly as a receiving server would, and shows the result and the reason. You can also enter a sender address (MAIL FROM) to test records that use macros.

ResultMeaning
passThe IP is allowed.
failThe IP is not allowed, and the record ends with -all (or a term with “−”).
softfailThe IP is probably not allowed (~all).
neutralThe domain says nothing about this IP.
noneThe domain has no SPF record.
permerrorThe record is broken, for example too many lookups or a syntax error.
temperrorA temporary DNS problem. Try again.
Why forwarded email can fail SPF An email goes from the original sender to a forwarding mailbox and then to the final receiver. The final receiver sees the forwarder's IP address, which is not in the sender's SPF record, so SPF fails. A note says DKIM can still pass, because it signs the message itself. Original senderexample.comIP in its SPF recordForwarderold address thatforwards your mailFinal receiversees the forwarder's IPnot in example.com's SPF SPF: fail DKIM signs the message itself, so it can still pass after forwarding

This is a known weakness of SPF, not a mistake in your record. It is one more reason to set up DKIM and DMARC as well.

10PROOF

How we tested it, and what it cannot do

An SPF checker must follow the rules exactly, or its advice is wrong. Before writing this page, we tested the checking logic against pyspf, a well-known open-source SPF library, using a pretend DNS zone that we controlled.

  • 713 test cases. They covered 31 domains and 23 IP addresses. The scenarios included include and redirect, a and mx with prefix lengths, exists with macros, IPv4 and IPv6, an IPv4 address written inside IPv6, qualifiers, loops, more than 10 lookups, void lookups, two SPF records, syntax errors, upper-case records, and domains that do not exist. Our results matched pyspf in all 713 cases.
  • Lookup counts. The number of DNS lookups matched pyspf for every sample domain we compared.
  • The whole tool. We ran it in a browser with a pretend DNS service and checked the domain check, messy input, long records split into several DNS strings, the sender test, paste mode, the batch table with CSV, the automatic switch to the second resolver, the builder, the report and the share link. The finished tool was also tried on live domains.
You might want toWhat happens
Check DKIMNot covered. A DKIM check needs the selector name your sender uses.
Test the ptr mechanismNot evaluated, because it is deprecated. The tool warns about it.
See what a receiver really decidedReceivers add their own rules. Send a test email to a Gmail or Outlook mailbox and read the message headers for the final verdict.
See new DNS changes at onceResolvers cache records for the TTL time. A change can take minutes or hours to show.
Know every address a service usesThe tool shows what the DNS lists today. Services may change it later.
Check a record with macros in include, a or mxThe analysis skips them and tells you. The sender test does expand them.
Check unlimited depthThe check stops at 120 DNS queries and notes it.
Be sure about the MAIL FROM of a serviceThe tool cannot see how your email service sets it. Check your service’s settings.
11SAFE

Is my domain sent anywhere?

The domain you check is sent from your browser to a public DNS resolver, Cloudflare or Google, because DNS is the only way to read an SPF record. It is not sent to our servers, and nothing is stored. The IP address and sender address you type for the sender test stay in your browser.

Where the data goes Your browser sends DNS questions about the domain to Cloudflare or Google over HTTPS and gets the records back. The checking, the sender test and the report are done in your browser. Our servers receive nothing. Your browserchecks the rules,tests the sender,makes the report DNS questionDNS answer Public DNSCloudflare or Google,over HTTPS Our serversreceive nothingand store nothing If a record uses “exists” with macros, the tested IP can appear inside a DNS name that is looked up.

Questions people ask

Is this SPF record checker free?

Yes. It is free, with no signup. The site may show ads around the tool to cover its costs.

What is an SPF record?

An SPF record is a TXT record in a domain’s DNS that lists which servers may send email for that domain. Receiving servers use it to spot mail that does not come from an allowed server.

How do I check my SPF record?

Type your domain in the tool and press Check SPF. You see the record, the number of DNS lookups, and a list of problems with fixes.

What does “PermError: too many DNS lookups” mean?

SPF allows at most 10 DNS-querying terms in one check. If your record, including everything it includes, needs more, receivers treat the SPF as broken. Remove unused includes, replace some with IP ranges, or send from separate subdomains.

Why can I have only one SPF record?

The rules say a domain must have exactly one record that starts with v=spf1. If there are two, receivers return a PermError. Merge them into one record.

What is the difference between ~all and -all?

~all is a soft fail: mail from other senders is accepted but treated as suspicious. -all is a hard fail: other senders should be rejected. Start with ~all, and move to -all when you are sure every sender is listed.

Do I need SPF if I use Google Workspace or Microsoft 365?

Yes. Add the include for your provider, such as include:_spf.google.com for Google Workspace or include:spf.protection.outlook.com for Microsoft 365, and add any other service that sends mail for you.

Why does SPF fail for forwarded email?

When a message is forwarded, the final receiver sees the forwarder’s IP address, which is not in the original sender’s SPF record. This is a known limit of SPF. DKIM and DMARC help in this case.

Does SPF stop people from faking my From address?

Not by itself. SPF checks the hidden envelope sender, not the From address that people see. DMARC links the two and tells receivers what to do when they do not match.

How long does it take for an SPF change to work?

It depends on the TTL of your DNS record, often a few minutes to a few hours. Some resolvers keep old answers until the TTL ends, so check again later.

Is it safe to flatten my SPF record?

It can solve the 10-lookup problem, but it has a cost. A flattened record lists IP addresses that providers may change, so you must update it by hand. Use it only when you can maintain it, or move senders to subdomains instead.

What SPF record should a domain that sends no email use?

Use v=spf1 -all. It says that no server may send mail for the domain, which stops spammers from using a parked domain.

Is my domain sent to a server?

The domain is sent from your browser to Cloudflare or Google DNS to read the records. It is not sent to our servers, and nothing is stored.

Waqas Amjad

Hi, I’m Waqas, the person behind Brivonto. I build each tool on this site myself, test it, and keep improving it from your feedback. I wrote this page and checked the SPF logic against an open-source reference library before publishing. If you find a mistake, or the tool gives a result you do not expect, please tell me.