SPF answers a narrow question: is this sending server authorized to send mail for the domain used in the SMTP envelope-from identity? It does not sign the message, it does not encrypt the message, and it does not by itself protect the visible From address. Those jobs belong to other mechanisms. Small businesses get into trouble when they treat SPF as a generic “email security TXT record” and paste vendor snippets into DNS without understanding which systems actually send mail.

Build the sender inventory before touching DNS

Write down every service that sends mail for the domain. A typical small company might have Google Workspace for employee mail, a CRM for sales sequences, a newsletter platform, Stripe or another billing system for receipts, a help desk, and a website application. Some of those systems may use their own envelope-from domain and therefore not require authorization in your root-domain SPF; others may require an `include:` mechanism or a dedicated return-path subdomain.

The inventory should answer: which service sends, what envelope-from domain it uses, what DKIM domain it signs with, and whether the vendor explicitly instructs you to modify SPF. Do not authorize a vendor just because the brand appears somewhere in your stack.

Read an SPF record from left to right

A common record might resemble:

`v=spf1 include:_spf.google.com include:mailvendor.example -all`

`v=spf1` declares SPF version 1. Each `include:` asks whether another domain’s SPF policy authorizes the current sending IP. The final `-all` says mail not matched by the preceding mechanisms should fail SPF.

The exact vendor domains above are illustrative; use the values your providers publish. Do not copy an SPF string from another company because it “looks right.”

SPF also supports mechanisms such as `ip4:`, `ip6:`, `a`, `mx`, and `redirect=`. Direct IP mechanisms are appropriate when you actually control stable sending IPs. Broad `a` or `mx` authorization can grant permission you did not intend, so use mechanisms because they match your architecture, not because they shorten the record.

Publish one SPF policy, not several competing records

A frequent mistake is creating one TXT record for Google Workspace and another for a marketing provider. Multiple SPF policy records at the same domain can produce a permanent error instead of combining permissions. Consolidate legitimate senders into one policy.

Another common failure is exceeding SPF’s DNS-lookup processing limit. RFC 7208 limits the number of mechanisms and modifiers that cause DNS lookups during evaluation. Nested `include:` chains count. A record can look compact in your DNS console and still trigger too many lookups after vendors expand through their own includes.

Before adding another provider, check how much lookup complexity the current record already has. If you are close to the limit, ask the vendor about using a custom return-path subdomain or another supported design rather than blindly adding another include.

Test the envelope identity, not just the visible From address

Send a real message from each production system to Gmail and open “Show original.” Find the SPF result and the domain it evaluated. That domain can differ from the address your recipient sees in the From header.

This distinction matters for DMARC. SPF can pass for a vendor-controlled bounce domain while DMARC still fails if that domain is not aligned with your visible From domain and DKIM also lacks alignment. A green “SPF pass” badge is therefore not enough; record which domain passed.

For each sender, save four values: source system, connecting IP if shown, SPF result/domain, and visible From domain. If a vendor changes its infrastructure later, that baseline makes troubleshooting easier.

Decide how strict the end of the policy should be

`-all` is a hard fail and `~all` is a soft fail. Do not choose one by superstition. First make sure your inventory is complete and production mail is testing correctly. If unknown legitimate systems still appear, fix the inventory before tightening the policy.

SPF is also vulnerable to forwarding because a forwarder’s server may not be authorized by the original envelope domain. DKIM and DMARC are important companions because they can preserve a trustworthy identity across scenarios where SPF alone does not.

A maintenance rule that prevents most SPF incidents

Require an email-identity review whenever someone adds a new platform that sends mail. The onboarding ticket should say whether SPF changes are needed, which DKIM selector is created, what return-path domain is used, and how a test message was verified. When a vendor is removed, delete authorization that is no longer necessary.

That small change turns SPF from a forgotten DNS string into an accurate list of who is allowed to use the domain for a particular SMTP identity.

Use return-path subdomains where they simplify sender ownership

Use return-path subdomains to isolate third-party senders when the provider supports them. A newsletter platform might use `bounce.news.example.com` while employee mail keeps a different envelope domain. Each evaluated domain can then have an SPF policy that reflects the systems that actually use it instead of forcing every vendor into one increasingly complex root-domain record.

A custom return path can also create SPF alignment for DMARC when it is a subdomain of the visible From domain under relaxed alignment. Verify this on a real message; a DNS record in the vendor dashboard is not proof that the envelope identity changed.

Subdomains are not a magic way around SPF limits. Each SPF evaluation still has to stay within the protocol's processing rules, and abandoned subdomains can leave stale authorization behind. Keep the sender inventory at the subdomain level, remove records when a service is retired, and test both SPF result and DMARC alignment after each change.