Home » Email » SPF Record Missing: How to Find Out and Add One
SPF Record Missing: How to Find Out and Add One
An SPF record is a line of text in your domain's DNS that lists the servers allowed to send email on behalf of the domain. If a scan or a mail test says "SPF record missing" or "no SPF record found", receiving servers have no list to check, so they have no evidence your mail is genuine.
Confirm that it is really missing
The record, if it exists, is a TXT record on the root of the domain (not on www) and always begins with v=spf1.
dig TXT example.com +short
On Windows, without dig:
nslookup -type=TXT example.com
Look through the output for a line starting with "v=spf1. If you see other TXT records (site verification codes, for example) but nothing starting with v=spf1, SPF is missing.
Before you conclude anything, make sure you asked the right DNS servers. If you recently changed nameservers, the records may live at your old provider. Ask the authoritative servers directly:
dig NS example.com +short
dig TXT example.com @ns1.your-dns-provider.com +short
Work out what should go in it
This is the step most guides skip, and it is where SPF records go wrong. An SPF record is not a template you paste. It is an inventory of everything that sends mail as your domain. Make a list:
- Your mailbox provider (Google Workspace, Microsoft 365, Zoho, and so on)
- Your website, if it sends contact form or order emails
- A newsletter or marketing tool
- A helpdesk or invoicing system
- Any server of your own that sends mail
Each service publishes the exact value to use, usually under a heading like "authenticate your domain" or "SPF". Use their value rather than guessing. Typical examples:
| Sender | Mechanism to include |
|---|---|
| Google Workspace | include:_spf.google.com |
| Microsoft 365 | include:spf.protection.outlook.com |
| A server with a fixed IPv4 address | ip4:203.0.113.25 |
Build and publish the record
Combine the mechanisms into one record, starting with v=spf1 and ending with an all qualifier:
v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all
Add it as a TXT record with these values at your DNS provider:
- Type: TXT
- Name / Host:
@(some providers want the bare domain or leave it blank) - Value: the full line above, as one string
- TTL: the default is fine
The ~all at the end means "mail from anyone else is suspicious but accept it". It is the safe starting point. Once you have watched your mail for a couple of weeks and are sure every legitimate sender is listed, you can tighten it to -all.
Check that it works
dig TXT example.com +short
You should see exactly one line starting with v=spf1. Then send a message from your domain to a Gmail address, open it, choose "Show original", and look for SPF: PASS near the top. Seeing PASS for a message sent through each of your services is the real test.
Common mistakes
- Putting the record on
wwwor a subdomain. SPF is checked against the domain in the email's envelope sender. For most mail that is the bare domain. - Creating a second SPF record because you added a new service. There must be only one. See multiple SPF records.
- Forgetting a sender. The website's contact form that sends through the hosting server is the usual one.
- Smart quotes or line breaks pasted from a document. The value must be plain text on one line.
- Assuming SPF is enough. It is one of three parts. DKIM signs the message and DMARC tells receivers what to do when checks fail.
Frequently Asked Questions
Do I need SPF if I only send a few emails a week?
Yes. Mailbox providers check authentication on every message, not only on bulk mail. Without SPF (and DKIM), even a small number of legitimate messages are more likely to be filtered.
Should I end my SPF record with ~all or -all?
Start with ~all (softfail) while you confirm every sender is listed. Move to -all (hardfail) once you are sure nothing legitimate is missing. A missing sender behind -all means real mail gets rejected.
Does SPF stop people from spoofing the From address that readers see?
Not by itself. SPF checks the hidden envelope sender, not the visible From address. DMARC is what ties the two together.
Found a mistake or still stuck? Contact us. See how we write and check these guides in our editorial policy, or read about DocumentGuy.