How to Use an SPF Checker to Protect Your Domain From Spoofing

An SPF checker reads your domain's DNS and flags the errors that let spoofers in or block your own mail. Here's how to run one and fix what it finds.

💡 The short answer

  • What it doesAn SPF checker reads the SPF record in your domain’s public DNS and tells you whether it exists, parses cleanly and stays under the 10-lookup limit.
  • What it needsOnly your domain name. No login, no access to your DNS host.
  • The errors that matterNo record, more than one record, broken syntax, and more than 10 DNS lookups. Each one can make legitimate mail fail SPF.
  • What it cannot doSPF alone does not stop spoofing of the From address people see. Pair it with DKIM and DMARC.

An SPF check in three moves

Look it up, fix what breaks, keep watching

Every SPF checker follows the same loop, whichever tool you open.

Look up

Enter the domain

The checker pulls the TXT record that starts with v=spf1.

Fix

Errors and lookups

Merge duplicates, repair syntax and get under 10 DNS lookups.

Monitor

After every change

Re-check when you add or drop a sending service, and read DMARC reports.

Email spoofing happens when an attacker forges a sender address or poses as a legitimate domain. The messages can look as if they came from a business you trust, a colleague, a bank or a supplier, which is exactly why they work. Spoofing opens the door to phishing, invoice fraud, credential theft and a damaged reputation for the domain being faked.

One practical defence is to publish a Sender Policy Framework (SPF) record and keep an eye on it. SPF, defined in RFC 7208, lets a domain owner list the mail servers allowed to send email on the domain’s behalf. An SPF checker confirms that the record is set up correctly and shows whether an unauthorized sender could slip through.

Run checks regularly and you catch configuration mistakes and unknown senders before they turn into failed deliveries or a successful spoof. The steps below work with any checker, and most fixes come down to a single DNS edit.

Understanding how an SPF checker protects your domain

What the checker looks atWhat a good result means
Record existsExactly one TXT record on the domain starts with v=spf1.
SyntaxEvery mechanism and qualifier parses, with spaces between terms.
Authorized sendersEach ip4, ip6 and include entry points at a service you actually use.
DNS lookupsThe include, a, mx, ptr, exists and redirect terms add up to 10 or fewer.
EndingThe record closes with -all or ~all, never +all.

What is an SPF checker?

An SPF checker is an online tool that examines the SPF record published in your domain’s DNS. It confirms the record exists, checks its syntax, lists the sending sources it authorizes and flags anything that could break email authentication.

SPF records are published as TXT records in the Domain Name System (DNS). Each one starts with the v=spf1 version tag, followed by mechanisms that name the servers allowed to send: IP addresses, domains and third-party email services. A typical record looks like this:

v=spf1 ip4:192.0.2.0/24 include:_spf.google.com -all

This record authorizes the IP range 192.0.2.0/24 and the sending servers covered by Google’s SPF configuration. The -all at the end tells receiving servers that any other source should fail SPF authentication.

If you work from a terminal, you can read the same record without a web tool: dig +short TXT example.com on macOS or Linux, or nslookup -type=txt example.com on Windows. A checker adds what the raw lookup does not, such as the lookup count and the syntax checks.

Why SPF is important for preventing email spoofing

Without SPF, an attacker can send mail that uses your domain in the sender address, and the receiving server has no published list to compare against. With SPF in place, the receiving server checks whether the message came from an approved source. If it fails SPF, the server weighs that result alongside DKIM and DMARC when it decides whether to deliver, filter or reject the message.

Mailbox providers now expect it. Google’s email sender guidelines require every sender to Gmail accounts to set up SPF or DKIM, and bulk senders to set up SPF, DKIM and DMARC. SPF has a blind spot, though: it checks the envelope sender (the Return-Path), not the From address the reader sees. It cannot stop every spoofing attempt on its own, but it is the layer the others build on.

How to use an SPF checker step by step

  1. Enter your domain name in the checker.
  2. Confirm that exactly one SPF record comes back.
  3. Review every authorized sending source in the record.
  4. Read the syntax and lookup warnings, then fix them in DNS.

Step 1: Enter your domain name

Open a reliable SPF checker and type the domain you want to inspect. You will not usually need a full email address or any login details, because the tool only reads public DNS records. If your business sends mail from example.com, enter example.com. The checker fetches the domain’s TXT records and shows the published SPF configuration, so you can review it without opening your DNS hosting dashboard.

Step 2: Verify that an SPF record exists

Next, check whether the tool found an SPF record at all. A valid record starts with the version tag v=spf1.

If the checker reports no SPF record, your outgoing mail has no SPF authentication, which makes the domain easier to spoof and can hurt deliverability. The checker may also report an error because the domain has more than one SPF record. SPF allows one record per domain; when receivers find two records starting with v=spf1, they cannot tell which policy to apply and return a permanent error (PermError).

Running a checker is the quickest way to spot either problem before legitimate email starts to fail.

Step 3: Examine authorized sending sources

SPF record on a laptop screen listing the ip4, ip6, include, a, mx and all mechanisms, with a magnifier over v=spf1
The six mechanisms you will see in most SPF records.

Now review the mechanisms in the record. Each one tells receiving servers which machines may send email for your domain. The one that catches people out is mx: it authorizes the servers named in your domain’s MX records, which are the machines that receive your mail. With a hosted provider those servers often never send anything, so mx can spend a DNS lookup without covering a real sender.

MechanismWhat it authorizesCounts toward the 10 lookups?
ip4Specific IPv4 addresses or ranges.No
ip6Specific IPv6 addresses or ranges.No
includeApplies the SPF rules of another domain, such as your email provider’s.Yes, plus any lookups inside it
aIP addresses in the domain’s DNS A or AAAA records.Yes
mxThe mail servers listed in the domain’s MX records.Yes
allSets the result for every source that did not match an earlier mechanism.No

An SPF checker helps you confirm that the record covers each service that sends as your domain: Microsoft 365 (include:spf.protection.outlook.com), Google Workspace (include:_spf.google.com), SendGrid, marketing automation platforms, CRM systems and transactional email providers.

Go through each authorized source carefully. Before you change the record, find out what any unfamiliar IP address or old service is. Delete a sender you still rely on and its mail starts failing SPF.

Step 4: Check for SPF syntax errors

Incorrect syntax makes it hard for receiving servers to evaluate your policy, and one small mistake can cause SPF to fail for every message.

A checker flags the common ones: a missing version tag, malformed mechanisms, invalid IP addresses, unsupported terms, multiple SPF records, misconfigured qualifiers and broken DNS references. It also catches smaller slips, such as two mechanisms with no space between them or an invalid domain inside an include.

🔍 Reading the qualifier before all

  • -all (fail): anything not listed should be rejected. The strict choice once you are sure every sender is in the record.
  • ~all (softfail): anything not listed is suspicious and usually goes to spam. A common setting while you are still finding senders.
  • ?all (neutral) says nothing useful, and +all authorizes the whole internet. A checker should warn about either.

Catching these early lets administrators correct the DNS record before failed authentication starts to affect delivery.

Identifying SPF lookup limit problems

SPF checker result showing 12 DNS lookups over the 10-lookup limit, cut to 8 after removing unused includes
Twelve lookups fail the check; trimming unused includes brings the record back under 10.

Understanding the 10 DNS lookup limit

SPF allows no more than 10 DNS lookups while a receiver evaluates your record. The include, a, mx, ptr and exists mechanisms count toward the limit, and so does the redirect modifier. The ip4, ip6 and all mechanisms do not.

Go over the limit and the receiver returns a PermError, which means it cannot evaluate your record at all. Many receivers treat that like a failure, so legitimate messages can end up rejected or filtered. The specification also says receivers should stop after two void lookups (DNS queries that return nothing), which is how an include pointing at a retired service can break a record that otherwise looks fine.

Here is how it happens in practice. A business that sends through several services usually needs a separate include for each, and every include can trigger further lookups of its own. Add a CRM, a newsletter tool and a help desk, and the record quietly passes 10. An SPF checker counts the lookups and points to the mechanisms responsible, so you can see whether the record needs trimming.

How SPF flattening helps reduce DNS lookups

SPF flattening replaces DNS-dependent mechanisms with the IP addresses they resolve to. Instead of making receivers look up each provider’s SPF record, the domain lists the authorized IP addresses directly.

The catch is maintenance. Email providers change their sending IP addresses, so a flattened record goes stale, and a missing address means legitimate messages fail SPF. Our guide to SPF flattening services covers how the process works and when it backfires.

Use an SPF checker to confirm that a flattened record is valid and within the lookup limit. Automated SPF management tools such as AutoSPF can also monitor the record and update it as your sending infrastructure changes.

How to fix SPF checker errors

Checker errorWhat usually causes itFirst fix
No SPF record foundThe record was never published, or was deleted in a DNS migration.Publish one TXT record built from your real senders.
Multiple SPF recordsA new service’s setup guide added a second v=spf1 record.Merge both into a single record.
Too many DNS lookups (PermError)Too many includes, or includes that nest further lookups.Remove unused services, then consider flattening.
Syntax errorA typo, a missing space or an invalid include domain.Correct the term the checker names, then re-run it.

Correct missing or invalid SPF records

If the checker finds no SPF record, build one around how your domain actually sends mail. Start by listing every legitimate service that sends on the domain’s behalf, add those sources to the record and choose a suitable ending, usually ~all while you test and -all once you are confident. Do not copy another domain’s SPF record: its providers, servers and setup will differ from yours. If the checker flags invalid syntax, review the mechanisms and qualifiers before you edit the DNS record.

Remove duplicate SPF records

Multiple SPF records cause authentication errors. If your domain has more than one SPF TXT record, combine the mechanisms you need into a single record. For example, merge the authorized sending sources for Google Workspace and your other email provider into one SPF record:

Before (two records, PermError):
v=spf1 include:_spf.google.com ~all
v=spf1 include:sendgrid.net ~all

After (one record):
v=spf1 include:_spf.google.com include:sendgrid.net ~all

Then run the SPF checker again to confirm that the record is valid and the duplicate-record error is gone.

Reduce excessive DNS lookups

If the checker shows that your domain goes over the 10-lookup limit, find the mechanisms that generate the extra queries. Remove email services you no longer use, replace DNS-dependent mechanisms you do not need, or consider SPF flattening where it fits. Before you add any new include, check what it does to the total. Staying within the limit prevents SPF PermError results and keeps authentication reliable.

Using an SPF checker alongside DMARC and DKIM

ProtocolWhat it checksWhere it lives
SPFWhether the sending server is on the domain’s approved list.A TXT record on the domain
DKIMA cryptographic signature that shows the message was not altered and was signed by an authorized domain.A public key in a TXT record under a selector
DMARCWhether SPF or DKIM passes and aligns with the visible From domain, and what to do when neither does.A TXT record at _dmarc.yourdomain

Strengthen email authentication with multiple protocols

SPF works best alongside DomainKeys Identified Mail (DKIM) and Domain-based Message Authentication, Reporting, and Conformance (DMARC). DKIM adds a cryptographic signature that helps receiving servers verify a message’s integrity and its link to an authorized signing domain. DMARC checks whether SPF and DKIM results align with the domain in the From address and lets the domain owner tell receivers what to do with messages that fail. That alignment step closes the Return-Path gap SPF leaves open, which is why the three together protect far better against spoofing and phishing than any one of them alone.

Monitor authentication results regularly

A single SPF check does not keep a domain safe for long. Whenever a business changes email provider, adds a marketing platform, migrates infrastructure or adopts a new communication tool, the SPF record may need updating.

Regular monitoring flags outdated records, unknown sending sources, lookup-limit problems and DNS mistakes. DMARC aggregate reports add the other half of the picture: they show which servers are sending mail as your domain, including unauthorized sources trying to impersonate it.

Between them, SPF checks and DMARC monitoring give you a clear view of how your email authentication is holding up.

Best practices for using an SPF checker

Keep your SPF record healthy

  • Review your SPF record regularly, and always after DNS or email infrastructure changes.
  • Authorize only legitimate senders, and remove outdated or unused services.
  • Keep your SPF record within the 10-DNS-lookup limit.
  • Publish only one SPF record per domain.
  • Use a reliable SPF checker to find syntax errors, lookup issues, missing records and authentication problems.
  • Read DMARC reports for unauthorized senders and suspicious activity.
  • Update your SPF record when you change email providers so it reflects your new sending infrastructure.
  • Use SPF, DKIM, and DMARC together to strengthen protection against email spoofing.

✅ Key takeaways

  • An SPF checker needs only your domain name and reads public DNS.
  • One record per domain, 10 DNS lookups at most, and an ending of -all or ~all.
  • Re-check after every change to the services that send mail as your domain.
  • SPF checks the Return-Path, so add DKIM and DMARC to protect the From address readers see.

Quick answers

Should my SPF record end in -all or ~all?

Use ~all while you confirm every service that sends for your domain, then move to -all once DMARC reports show no legitimate mail failing. Either beats ?all or +all.

Is SPF required to send email to Gmail?

In practice, yes. Google’s email sender guidelines require every sender to Gmail accounts to set up SPF or DKIM, and anyone sending in bulk to set up SPF, DKIM and DMARC.

Can a domain have two SPF records?

No. Under RFC 7208, the SPF specification, a second record starting with v=spf1 makes receivers return a PermError. Merge the mechanisms into one record instead.

Does SPF cover subdomains?

No. SPF records are not inherited, so a subdomain that sends mail, such as mail.example.com, needs its own record.

How often should I run an SPF checker?

After every change to your email providers or DNS, and on a regular schedule, such as monthly, to catch includes that changed on the provider’s side.