What is an SPF record?
An SPF record (Sender Policy Framework) is a TXT record in your domain's DNS that lists the servers allowed to send email for that domain. Receiving servers compare the sending server's IP address with the list and mark the message pass or fail.
Every cold email domain needs one, next to DKIM and DMARC. It is the shortest of the three records and the easiest to break.
Reading an SPF record
v=spf1 include:_spf.google.com ~all
| Part | Means |
|---|---|
| v=spf1 | This TXT record is an SPF record. It must come first |
| include:_spf.google.com | Also allow every server Google's own SPF record allows |
| ~all | Anything not listed is a soft fail: accept, but treat as suspicious |
Mechanisms you'll see
| Mechanism | Allows | Counts as a lookup |
|---|---|---|
| ip4: / ip6: | An IP address or range | No |
| include: | Every server in another domain's SPF record | Yes, plus any lookups inside it |
| a | The domain's own A record IPs | Yes |
| mx | The domain's mail servers | Yes |
| redirect= | Use another domain's record instead | Yes |
| exists: / ptr | Rare, older setups | Yes |
| all | Everything else, with the qualifier in front | No |
The qualifier on all
| Ending | Result | Typical use |
|---|---|---|
| -all | Fail | Strict. Microsoft 365 recommends it |
| ~all | Soft fail | Common default. Google's setup guide uses it |
| ?all | Neutral | Says nothing. Avoid |
| +all | Pass for anyone | Never use. Lets every server send as you |
On a cold email domain with one mailbox provider, either -all or ~all works. With a DMARC policy in place, DMARC decides what happens to failing mail anyway.
Rule 1: one SPF record per domain
A domain can have only one TXT record starting with v=spf1. Two records is a permanent error, and receivers treat the domain as having no valid SPF at all. This usually happens when a second tool's setup guide says "add this SPF record" and you add it instead of merging.
Merging two records on getharborgrid.com
- Record 1
- v=spf1 include:_spf.google.com ~all
- Record 2
- v=spf1 include:mail.example-tool.com ~all
- Merged, one record
- v=spf1 include:_spf.google.com include:mail.example-tool.com ~all
Keep one v=spf1 at the start and one all at the end. Delete the second record.
Rule 2: no more than 10 DNS lookups
Checking SPF may trigger at most 10 DNS lookups. Every include, a, mx, redirect and exists counts, and so do the lookups nested inside each include. Go over and SPF returns a permanent error, which fails it for every message.
Counting lookups on getfernway.com (illustrative)
- include:_spf.google.com
- 1, plus any nested inside it
- include:mail.example-crm.com
- 1 + 3 nested = 4
- include:send.example-newsletter.com
- 1 + 4 nested = 5
- mx
- 1
- Total
- 11 or more: over the limit, SPF fails
Paste your domain into any free SPF checker. It expands every include and shows the real count.
- Remove what you don't use. Old tools often stay in the record for years.
- Drop a and mx unless those servers really send mail.
- Use ip4 for fixed servers. IP ranges cost no lookups.
- Split the work. Keep newsletters and the CRM on your main domain and cold email on its own sending domain. Each domain gets its own 10.
SPF on a cold email domain
Cold email tools such as Instantly and Smartlead usually send through the inboxes you connect. The mail leaves Google's or Microsoft's servers, so your record only needs that one provider.
| Mailbox provider | SPF record for the sending domain |
|---|---|
| Google Workspace | v=spf1 include:_spf.google.com ~all |
| Microsoft 365 | v=spf1 include:spf.protection.outlook.com -all |
Add it as a TXT record with the host set to @ on every sending domain. If a tool sends through its own servers instead, add the include it gives you to the same record.
Tip: Test it. Send to a Gmail inbox you own, choose Show original and look for SPF: PASS with your server's IP. What is DKIM shows the full result block.
What SPF doesn't cover
- The From address. SPF checks the hidden envelope sender (Return-Path), not the name people see. DMARC links the two.
- Forwarded mail. A forward comes from a new server that isn't in your record, so SPF fails. DKIM usually survives.
- Your list. A perfect record doesn't stop bounces from dead addresses.
That last one matters most for cold email. SPF gets mail accepted for checking. Hard bounces, the real damage, come from the data: see email bounce rate and why your bounce rate is high. To see how verification spots domains that can't receive mail at all, read what is an MX record.
Send to a list that matches the setup
ContactYard is the fastest way to fill a newly set-up domain with people worth emailing. Search hundreds of millions of verified B2B prospects by Job Title, Industry, Employee Headcount and Location, then export the CSV to your sending tool.
- Verified before you get it. Every work email is checked, so no separate verifier.
- One credit, full contact. Email, mobile when available and verification. Other tools charge 4 to 12 credits.
- About $3.30 per 1,000 on Scale. Data refreshed every 14 days.
Start free and send your warm-up weeks to contacts that won't bounce.
FAQ
- What is an SPF record?
- A DNS TXT record starting with v=spf1 that lists the servers allowed to send email for your domain.
- Can a domain have two SPF records?
- No. Two v=spf1 records cause a permanent error. Merge every include into one record.
- What is the SPF 10 lookup limit?
- SPF may trigger at most 10 DNS lookups, counting include, a, mx, redirect and exists, nested ones too. More fails SPF.
- Should SPF end in ~all or -all?
- Either works on a sending domain with one provider. Never use +all, which lets anyone send as you.
- What is an SPF record example for Google Workspace?
- v=spf1 include:_spf.google.com ~all, added as a TXT record on the domain.
Keep reading
What is DKIM?
What DKIM signing is, what the DNS record looks like and how to switch it on for a cold email domain.
What is DMARC?
What DMARC checks, what each policy value does and which record to publish on a cold email domain.
Email bounce rate
What email bounce rate means, how to calculate it, and what counts as a good number.