Skip to content
Groundmail

Free tool · Check

SPF record checker

Look up a domain's SPF record, count the DNS lookups it costs (receivers stop at 10), and see every problem with a fix.

SPF records explained (and the 3 ways they break). Video, with captions.
Read the transcript

Your SPF record is probably fine. Unless you added one more email tool last month. Then it might be failing on every email you send, and nothing tells you. Here's how to read an SPF record, and the three ways they break. SPF is one line of text in your domain's DNS. It lists the servers allowed to send email for your domain. When an email arrives, the receiving server looks at who actually delivered it, and checks that server against your list.

On the list, it passes. Not on it, it fails. Here's a real one. It always starts with v=spf1. Then the senders. Each include pulls in a provider's list of servers. This one says Google Workspace can send for me, and so can Groundmail. An ip4 entry lists one server by its address. And the last part, the all, says what to do with everyone else. Tilde all is a soft fail: mail from anyone not on the list gets marked suspicious.

That's the safe place to start. Minus all rejects it outright. Move to that once you're sure every service you use is listed. And never use plus all. That lets anyone on the internet send as you. Easiest way to check yours: put your domain into our free SPF checker. It follows every include, counts your lookups, and tells you exactly what to fix. One: two SPF records. You add a new tool, its setup page says add this record, and now you have two.

With two records, SPF fails for everything. Merge them into one. Two: too many lookups. Every include costs a DNS lookup, and includes can contain more includes. Receivers stop at ten. Past ten, SPF fails for every email. Three: leftovers. Includes for tools you stopped using years ago. They still cost lookups, and they still let those services send as you. This is the one people miss, because the record looks fine by eye.

One include can quietly cost several lookups on its own. When you go over ten, the receiver gives up and calls it a permanent error. The checker shows what each include costs, so you know which one to cut. One catch. SPF checks the return path, the hidden bounce address, not the From address your customer sees. So SPF can pass for your provider's domain, while saying nothing about yours. That's why you also need DKIM and DMARC.

That's the next video. So: one SPF record, a ~all at the end, under ten lookups, and nothing in it you don't use anymore. If you send with Groundmail, you add one include. We show you your record with ours merged into the one you already have, so you never end up with two. The SPF checker and the SPF record generator are free at groundmail.dev/tools. Links are in the description.

What the SPF checker checks

It looks up the SPF record for a domain, checks the syntax, follows every include and counts the DNS lookups the record costs against the limit of 10. SPF tells receivers which servers may send mail for your domain, and a missing, duplicated or over-limit record makes SPF fail, which pulls DMARC and inbox placement down with it.

How to read your results

SPF record is valid
One record, a sensible all at the end, and under 10 lookups. Nothing to do; check again whenever you add a service that sends as your domain.
No SPF record
Receivers can't tell which servers may send for you. Publish a TXT record at the root of your domain; the SPF record generator builds one.
Two or more SPF records
More than one v=spf1 record is a permanent error, so SPF fails for everything. Merge them into a single record.
Over 10 DNS lookups
Receivers stop evaluating and SPF fails for every message. Remove includes for services you no longer use; the checker shows what each include costs.
Ends in +all
Lets any server on the internet send as your domain. Change it to ~all.
Ends in ?all, or no all
Neutral: receivers learn nothing about servers you didn't list. End the record with ~all.
Include has no SPF record
Usually a typo or a provider that changed its include. Check the provider's current setup docs, or remove it if you've stopped using the service.
Uses ptr
The ptr mechanism is slow, deprecated, and ignored by some receivers. Replace it with ip4:, ip6: or the provider's include.

What SPF does

SPF is a TXT record at your domain that lists the servers allowed to send mail for it. Receivers compare the server that delivered a message with that list, using the domain in the return path (the envelope sender), not the From address you see.

Every include:, a, mx, exists and redirect= costs a DNS lookup, and includes can contain more includes. Past 10 lookups receivers give up and SPF fails for every message, which is the most common SPF problem and the hardest to see by eye.

Fix this by sending through Groundmail.

Add your domain and we give you the exact SPF, DKIM, DMARC and return-path records, check them for you, and sign every message with your own domain's key. Free for 3,000 emails a month.

Questions

What is an SPF record?

A TXT record at the root of your domain that starts with v=spf1 and lists the servers allowed to send email for that domain, for example v=spf1 include:_spf.google.com ~all. Receivers check the sending server against it, and DMARC uses the result.

What is the SPF 10 lookup limit?

RFC 7208 caps an SPF evaluation at 10 DNS lookups. include, a, mx, ptr, exists and redirect each count, including the ones inside included records. Over 10 is a permanent error and SPF fails for all of your mail.

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

~all (soft fail) is the safe default: mail from unlisted servers is marked suspicious rather than rejected. Move to -all once you're sure every service that sends for you is listed. Never use +all, which lets anyone send as you.

What does SPF softfail mean?

The sending server isn't in the domain's SPF record and the record ends in ~all. Receivers usually accept the message but treat it as suspicious. If it's your own mail, add the service that sent it to your record.

Can I have two SPF records?

No. With more than one v=spf1 record SPF fails for everything. Merge them into one record with every include in it.

What SPF include does Groundmail use?

include:spf.groundmail.dev, but only on a sending subdomain such as mail.example.com, merged into any SPF record already there. On a main domain like example.com your SPF record stays as it is: Groundmail mail passes SPF on the return-path subdomain (rp.example.com), so it needs no include there.