adaptverify

Authentication

What is an SPF record?

An SPF record is a line of DNS text that lists which servers may send email for your domain. Receivers check it before they trust a message.

By the Adapt Verify editorial team.

What an SPF record is

SPF stands for Sender Policy Framework. When a server receives a message, it looks up the SPF record of the domain the message claims to come from, and checks whether the sending server is on the list.

It is published as a TXT record on your domain. It does not stop anyone writing your address on a message. It lets receivers see which messages came from servers you approved.

How to read one

Here is a typical record for a business that sends through Google Workspace:

  • v=spf1 starts the record
  • include:_spf.google.com adds Google's list of sending servers
  • ~all says what to do with every other server

The last term matters. -all means other servers fail. ~all means they are marked suspicious. ?all says nothing about them. +all lets any server send as you, and should never be used.

The 10-lookup limit

Each include, a, mx, ptr, exists and redirect in your record makes the receiver run a DNS lookup, and so does everything nested inside an include. The standard allows 10. Past that, receivers return a permanent error and your SPF fails.

Businesses hit the limit by adding one marketing or support tool after another. If you are near it, remove services you no longer use before adding another.

Common mistakes

  • Two SPF records on one domain. Merge them into one.
  • A sending service missing from the record, so its mail fails.
  • Ending with +all.
  • Leaving old services in the record after you stop using them.

How to check yours

Enter your domain in the domain check. It shows your SPF record and how it ends, and counts the DNS lookups. Check again after any change, because DNS changes can take a while to show.

Questions people ask

What is the difference between ~all and -all?

-all tells receivers to fail mail from servers not on your list. ~all tells them to treat it as suspicious. Many domains start with ~all and move to -all once they are sure every sending service is listed.

Do I need SPF if I already use DKIM?

Yes. Gmail and Yahoo expect senders to set up SPF, DKIM and DMARC, and DMARC passes when either SPF or DKIM passes and lines up with your From domain. Having both is safer.

How many SPF records can a domain have?

One. If a domain has two, receivers treat it as an error and SPF fails.

Does SPF stop people spoofing my domain?

Not on its own. SPF checks the hidden envelope sender, not the From address people see. DMARC links the two and tells receivers what to do when they don't match.

Written by the Adapt Verify team, with AI help, and checked before publishing. This is general guidance, not legal or technical advice.