What is an SPF record? How SPF works in plain English
An SPF record lists which servers may send email for your domain. What it is, how receivers use it, what it cannot do, and what to ask your email provider.
An SPF record is a short line of text in your domain’s public settings (DNS) that lists which servers are allowed to send email using your domain name. When an email arrives, the receiving system reads that list and checks whether the sending server is on it.
That is the whole idea. The rest of this guide explains what it means for your business email, in plain English, and what to ask the person who looks after your email.
What SPF stands for
SPF stands for Sender Policy Framework. The standard that defines it, RFC 7208, describes the problem it solves: any computer that sends email can claim to be sending as any domain name it likes, and domain owners are understandably worried about how easily others can use their names, often with bad intent. SPF lets a domain owner publish which servers may send for the domain, so receivers can test it.
Think of it as a guest list at the door. The list is public, and the receiving mail system checks the sender’s name against it.
What an SPF record looks like
It is a single line of text. The standard gives this example:
v=spf1 +mx a:colo.example.com/28 -all
You do not need to read it yourself. In general terms:
- The start (
v=spf1) says “this is an SPF record”. - The middle lists who may send: your mail provider, your website, a newsletter tool and so on.
- The end says what a receiver should make of anyone not on the list.
The record lives in your domain’s DNS, as one text entry. DNS is the public address book of your domain, and anyone, including Gmail, can read it.
How SPF works, step by step
- An email arrives at a receiver, for example Gmail.
- The receiver notes which server delivered it and which domain the message says it was sent from (the hidden sending address, not the name shown in your inbox).
- It looks up that domain’s SPF record in DNS.
- It checks whether the delivering server is on the list.
- It gets a result. RFC 7208 defines several, including pass (the server is allowed), fail (it is not), softfail (a weak statement that it is probably not allowed), neutral (the owner says nothing either way), and permerror (the record itself is broken).
What the receiver does with a failure is up to the receiver. SPF reports a result; it does not by itself throw a message away. That is why it is normally paired with DMARC, which says what you want done. See our guide to what DMARC is and the longer explainer on SPF, DKIM and DMARC together.
Why a small business needs one
Every service that sends email as your company (your mailbox provider, your website contact form, your invoicing tool, your newsletter) is a server that should be on the list. Without a record, receivers have nothing to check against, and anyone can send mail that claims to be from you with no sign it is fake. That is how fake invoices and “please change our bank details” emails appear to come from a real company. We cover that in our guide to fake invoice emails.
A correct record also helps your real email. If your messages keep landing in spam, a missing or broken SPF record is one of the first things to check. See why email goes to spam.
The mistakes we see most
- Two records. RFC 7208 says a domain must not publish more than one SPF record. A receiver that finds two returns a permanent error, and the check fails for everyone. This often happens when a new email service is added by creating a new record instead of editing the old one.
- A list that is out of date. You stopped using a newsletter tool a year ago but it is still on the list, or you started using a new one and it is not.
- Too many lookups. Some parts of a record make the receiver do extra DNS lookups. The standard caps these at 10; past that the result is an error. We explain it in SPF too many lookups.
- Typos. One wrong character and the receiver ignores or rejects the record.
- No DMARC behind it. SPF on its own does not tell receivers what to do with a failure.
What SPF will not do
- It does not check the name people see in the From line. A forger can pass SPF using a domain they own while showing your name to the reader. DMARC closes that gap.
- It does not look inside the email for viruses or scams.
- It does not stop a lookalike domain, such as one letter changed.
- It can break when mail is passed along. The standard itself notes that mail forwarders and mailing lists can cause a legitimate message to fail the check.
What to ask your email provider or IT person
You do not need the technical words. Ask:
- Do we have exactly one SPF record on our domain?
- Is every service that sends email as us on it, and is anything on it that we no longer use?
- Is it within the limit of 10 lookups?
- Do we also have DKIM and DMARC, and which setting does DMARC use?
- Who updates it when we add or change a tool that sends email?
Want us to check it?
Type your domain into our free SPF checker to see whether you have a record and whether it has obvious problems. If you want someone to set it up safely, keep it right as your tools change and add DKIM and DMARC without losing real email, see our domain and email security service.
- Email hello@wpfoss.com
- WhatsApp +254 118 271 160
- Tell us what you need
Sources and further reading
- RFC 7208: Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1. Source for the name and purpose, the example record, the single-record rule (more than one gives a permanent error), the result types (pass, fail, softfail, neutral, permerror) and the limit of 10 lookups. Read the introduction and sections 3 to 4. The page notes it may have been updated by later documents; those were not read for this post.
Frequently asked questions
What is an SPF record?
An SPF (Sender Policy Framework) record is a single line of text published in your domain's public DNS. It lists which servers are allowed to send email using your domain name, so a receiving mail system can check the sender against it.
What does SPF stand for?
Sender Policy Framework.
Where is an SPF record kept?
In your domain's DNS, as a TXT record that starts with v=spf1. DNS is the public address book of your domain, so anyone, including Gmail, can read it.
Can a domain have more than one SPF record?
No. The standard says a domain must not publish more than one, and a receiver that finds two treats it as an error. If you add a new email service, the existing record has to be changed, not a second one added.
Does SPF stop people faking my email address?
Not on its own. SPF checks the hidden sending address, not the name people see in the From line. DMARC is what ties the two together and tells receivers what to do with failures.
How do I check my SPF record?
Use a free SPF checker. It looks up your domain in public DNS and shows whether a record exists and whether it has obvious problems.
