What is SPF?
SPF (Sender Policy Framework) is a DNS record that lists the mail servers allowed to send email for your domain. A receiving server checks the sending server's address against that list and records a pass or a fail.
It is one of the three records that prove a message really came from you, next to DKIM and DMARC. Gmail and Outlook now expect all three from anyone sending at volume, and a missing or broken SPF record is one of the first things a deliverability check flags.
How it works
SPF is defined in RFC 7208, published by the IETF in April 2014. The record is a TXT entry at the root of your domain that starts with v=spf1, followed by the senders you allow and a rule for everyone else.
The check runs against the envelope sender, the return path address the sending server uses during delivery. That address is often different from the From line the reader sees, which is why DMARC exists: it requires the SPF domain to align with the visible From domain before SPF counts.
| Part | What it does |
|---|---|
| v=spf1 | marks the record as SPF. Every record starts with it. |
| include: | allows another service's servers, such as Google Workspace or a sequencing tool, by pointing at that service's own SPF record. |
| ip4: and ip6: | allow a specific server address directly. |
| ~all | soft fail. Mail from servers not listed is treated as suspicious. Google recommends this ending. |
| -all | hard fail. Mail from servers not listed should be rejected. |
The 10 lookup limit
The rule that breaks many SPF records is the lookup limit. RFC 7208 says the terms that trigger DNS queries (include, a, mx, ptr, exists and redirect) must be limited to 10 during evaluation, and that going over returns a permanent error. Each include also counts the lookups inside the record it points to. The RFC adds a second limit of two "void lookups", queries that return nothing, and exceeding that is also a permanent error.
A permanent error means SPF fails for every message, including legitimate ones. Google's setup guide states the same practical ceiling: an SPF record can have up to 10 include tags.
Example
A secondary domain that sends only from Google Workspace needs one line, the record Google gives in its setup guide:
| Record | Value |
|---|---|
| Type | TXT |
| Host | @ |
| Value | v=spf1 include:_spf.google.com ~all |
If a sequencer sends through its own servers instead of your Workspace inboxes, its include goes before the ~all in the same record. Tools that send through your connected Google or Microsoft mailbox usually need nothing extra, so check the vendor's docs before adding anything.
Common mistakes
- Two SPF records on one domain. RFC 7208 says a domain must not have multiple SPF records, and a check that finds more than one returns a permanent error. Adding a new service means editing the existing record.
- Too many includes. Every tool a team has ever trialed tends to stay in the record. Past 10 lookups, SPF fails for everything. Remove services you no longer use.
- Forgetting new domains. Google notes each domain needs its own SPF record. A secondary domain bought for outbound starts with none.
- Stopping at SPF. SPF alone breaks when mail is forwarded, and it says nothing about the visible From line. Pair it with DKIM and DMARC.
Related terms
- DKIM
- DMARC
- Sender reputation
- Email warmup
If you want your sending domains checked before the next campaign, book a free working session and we can work through it together.
Sources
- RFC 7208: Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1, IETF, checked 2026-11-20
- Set up SPF, Google Workspace Help, checked 2026-11-20
- Email sender guidelines, Google, checked 2026-11-20