What an SPF record is, and why your emails land in spam
However good your email is, it won't reach the inbox if the receiving server can't be sure you are really you.
An SPF record is a text record added to a domain's DNS settings that lists which servers are allowed to send email on behalf of that domain.
What SPF, DKIM and DMARC do
- SPF: says whether the sending server is authorized
- DKIM: proves with a digital signature that the message wasn't changed in transit
- DMARC: tells the receiver what to do if SPF or DKIM fails, and sends you reports
The three work together. If one is missing, it weakens the trust the other two provide.
Example records
For a domain that uses Google Workspace and has added an email marketing tool, the SPF record usually looks like this:
v=spf1 include:_spf.google.com include:yourtool.com ~allv=DMARC1; p=none; rua=mailto:dmarc@yourdomain.comThe first line is the SPF record and goes on the domain itself. The second is the DMARC record and goes on a subdomain record named _dmarc. Replace "yourtool.com" with the value your sending tool gives in its documentation. The DKIM key is generated in each tool's own settings.
Gmail and Yahoo changed the rules
Since February 2024, Gmail and Yahoo expect anyone sending to personal accounts to have at least SPF or DKIM in place. Senders of more than 5,000 emails a day need all three, SPF, DKIM and DMARC, plus a one click unsubscribe link and a spam complaint rate below 0.3 percent. Mail that doesn't meet these requirements lands in spam or isn't delivered at all.
The most common mistakes
- More than one SPF record: a domain can only have one, and a second one invalidates both
- Leaving out the sending tool: if your newsletter tool isn't in SPF, every campaign fails authentication
- Going over the 10 lookup limit: a record with too many includes breaks without warning
- Never setting up DMARC, or never reading its reports
- Sending high volume from a new domain all at once: the domain has no reputation yet
How to check it yourself
Send an email to your own Gmail address, open it and choose "Show original". If SPF, DKIM and DMARC all say PASS, authentication is fine. If one says FAIL or is missing, that's where the problem is. If all three pass and mail still goes to spam, the problem is no longer identity. It's list quality and sending habits.
Frequently asked questions
Where do I add an SPF record?
In your domain's DNS settings, as a TXT record. Add it wherever you manage the domain, at your registrar or your DNS provider.
What's the difference between ~all and -all in SPF?
~all marks mail from a server that isn't on the list as suspicious. -all has it rejected. Using -all before you're sure every sending source is listed can make legitimate email disappear too.
Should I set DMARC to p=reject right away?
No. Start with p=none and read the reports for a few weeks. Once every legitimate source passes authentication, move to quarantine and then to reject.
If your records look right and mail still lands in spam, let's take a look with a free audit.
Read how we think in 13 pages
Our philosophy, our equation and what our services and advisory add to a brand. Not a price list, the way we work.
Last updated: