What an SPF record does
Sender Policy Framework, or SPF, is a DNS-based way to list systems permitted to send mail for a domain. A receiving mail server can compare the server connecting to it with the policy published in DNS. SPF is one part of email authentication; it does not, by itself, prove who wrote a message or guarantee that a message will reach an inbox.
An SPF policy is usually published as a TXT record at the domain being checked. It begins with v=spf1, followed by mechanisms that describe authorized senders and an ending that specifies how to treat senders that do not match. For example, an organization might authorize its mail host, a newsletter service, and a server that sends website notifications.
Why separate SPF policies cause trouble
A domain must not publish multiple SPF policies at the same DNS name. If a receiver finds more than one TXT record beginning with v=spf1 for the domain it is checking, SPF evaluation produces a permanent error rather than choosing one policy or combining them automatically. That can make legitimate messages harder to authenticate.
This commonly happens when each new email provider supplies an SPF record and someone adds it alongside the existing one. Other TXT records at the same name are fine: a domain may need TXT records for verification or other purposes. The problem is specifically having multiple SPF policies at that name. A long SPF TXT value may also be stored in multiple quoted strings within one DNS record; that is different from publishing multiple SPF records.
How to combine authorized senders
Start by finding the existing SPF policy and making an inventory of systems that send mail using the domain. Include regular mailboxes, automated application mail, newsletters, and any third-party service that sends on the domain’s behalf. Check each service’s setup instructions for the exact SPF mechanism or include value it requires. Do not assume that a service needs an SPF entry just because it appears in a message’s visible From address.
Put the required mechanisms into one policy. An illustrative TXT value for example.com might be: v=spf1 ip4:192.0.2.10 include:_spf.mailer.example include:_spf.hosted.example ~all. Here, the IP address and provider names are placeholders, not working settings to copy. The ip4 mechanism authorizes a specified sending address, while each include refers to another SPF policy whose permitted senders can match. There is only one v=spf1 and one ending.
Before replacing a record, check whether its current mechanisms still serve an active sender. Removing one without checking can cause that sender’s mail to fail SPF. Conversely, remove entries for services that no longer send mail; an SPF policy is easier to maintain when it reflects the actual mail setup.
Watch the lookup limit and the final mechanism
SPF has a limit of ten DNS-lookup-causing mechanisms and modifiers during evaluation. Includes can lead to further includes, so a short-looking record can still exceed the limit. Mechanisms such as include, a, mx, exists, and redirect count toward it; ip4 and ip6 do not. If a combined policy is too complex, review unused services and ask providers whether they offer a simpler supported configuration. Do not add an include without considering what it references.
The final mechanism also matters. An ending of ~all marks unmatched senders with a soft fail, while -all specifies a fail. Neither fixes an incomplete list of authorized senders. If you are still identifying systems that send for the domain, avoid switching to a stricter ending until you understand the likely impact. Keep the final mechanism at the end of the policy.
Check the right domain after making a change
SPF checks the domain used in the SMTP envelope sender, also called the return-path domain, or sometimes the HELO identity. That may differ from the visible From domain. A service using its own return-path domain might pass SPF without using your domain’s SPF policy; that result alone does not mean SPF aligns with your visible From domain for DMARC. Check which domain each service actually uses before deciding where its SPF entry belongs.
After updating DNS, inspect the published TXT records at the intended name and confirm that exactly one begins with v=spf1. Check the combined policy’s syntax and lookup count, then send test messages through each authorized system and review the authentication results available in the received messages. DNS changes may take time to reach all resolvers, so keep a copy of the previous policy while verifying the new one.



