• Features
  • Pricing
  • Migration
  • Integrations
  • Resources

Main meniu
Main meniu
Main meniu
Main meniu
Request migration
Glossary · Email authentication

SPF (Sender Policy Framework)

SPF (Sender Policy Framework) is an email authentication standard that uses a Domain Name System (DNS) TXT record to list the mail servers authorized to send email for a domain. Receiving servers check the sending IP against this list. Mailbox providers also use DomainKeys Identified Mail (DKIM) and Domain-based Message Authentication, Reporting, and Conformance (DMARC) to verify the store’s emails, and failed authentication can make order and marketing emails more likely to land in spam.

Also known as Sender Policy Framework SPF record

How does SPF work?

SPF works by checking the connecting server’s IP against the SPF record of the return-path domain, the bounce address your sending platform sets behind the scenes. The receiving server runs this check in five steps:

  1. Your sending platform connects to the receiving server  
     
  2. The receiving server reads the return-path domain  
     
  3. A DNS lookup fetches that domain's SPF record  
     
  4. The server checks the connecting IP against the record's rules  
     
  5. The check returns a result such as pass, softfail, fail (hardfail), or permerror  
     

The return-path domain isn’t always the same as the visible From domain. SPF checks the former, not the address your subscriber sees. This means SPF alone can’t stop someone from spoofing your visible From address.

What does an SPF record look like?

An SPF record is a DNS TXT entry that starts with v=spf1. It then lists authorized senders through mechanisms such as include: and ip4:. At the end, an all mechanism defines the policy for senders that don’t match the listed rules.

Here's a hypothetical TXT record for store.example:
v=spf1 include:_spf.storeplatform.example include:_spf.emailplatform.example ip4:198.51.100.25 ~all
TagWhat it meansExample
v=spf1Marks the record as SPF, and always comes firstv=spf1
include:Checks another domain’s SPF record for authorized sendersinclude:_spf.emailplatform.example
ip4:Authorizes a specific IPv4 address or networkip4:198.51.100.25
~allSoftfail, which flags any unlisted sender as suspicious~all
-allHardfail, which asks receivers to reject any unlisted sender-all

Every SPF record must follow three rules:

  • One record per hostname: Multiple SPF records for the same hostname cause a permanent error (permerror)
  • End with an "all" mechanism: This defines the result for senders that don’t match earlier mechanisms
  • Stay within 10 DNS lookups: SPF allows up to 10 DNS-querying terms during evaluation, including nested lookups

How does SPF work with DKIM and DMARC?

SPF checks whether the connecting server is authorized to send for the return-path domain. DKIM verifies the message’s digital signature. DMARC checks whether SPF or DKIM passes and aligns with the domain shown in the From address.

ProtocolWhat it checksWhat it can’t do
SPFWhether the return-path domain authorizes the connecting serverAuthenticate the visible From address
DKMIWhether the message’s digital signature verifies against the signing domainSet a policy for authentication failures
DMARCWhether SPF or DKIM passes and aligns with the visible From domainAuthenticate messages without SPF or DKIM

SPF can pass while DMARC fails because the return-path domain may not match the visible From domain. This is called an alignment failure. DKIM can provide the aligned result instead if its signing domain matches the visible From domain.

Learn how to configure the policy in our guide to setting up DMARC.

Why does SPF matter for online stores?

SPF helps online stores authenticate their emails and meet mailbox providers’ sender requirements. It also helps protect store domains from spoofing.

Google requires all senders to personal Gmail accounts to use SPF or DKIM authentication. Bulk senders must configure SPF, DKIM, and DMARC. 

Google defines bulk senders as those sending 5,000 or more messages daily to personal Gmail accounts. A DMARC policy of p=none meets its minimum policy requirement. Your From domain must also align with SPF or DKIM.

Yahoo and Microsoft also require bulk senders to use SPF, DKIM, and DMARC. Microsoft’s rule covers domains that send more than 5,000 emails a day to Outlook.com, Hotmail, and Live addresses, according to its high-volume sender requirements.

For stores, authentication failures can send order confirmations, abandoned-cart emails, and campaigns to spam or cause them to be rejected. Spoofed order emails can also damage customer trust.

Proper authentication supports your email sender reputation. See our wider guide to improving email deliverability for more checks.

How does SPF work when you send through an email platform?

When you use an email platform, it may ask you to add an include: mechanism to your SPF record. This tells receiving servers to check the platform’s SPF record to see whether its servers are allowed to send emails. The platform provides the domain you need to add.

Most stores use more than one service to send emails. Your ecommerce platform may send order confirmations, while your email platform sends campaigns. You may also use a helpdesk and Google Workspace for customer support and business emails. 

SPF checks the return-path domain used by each service, which may differ from the visible From address.

If several services use the same return-path domain, their sending permissions must go into one SPF record for that domain. Add each required include: entry to the existing record. If a service uses a different return-path domain, its SPF check uses that domain’s record instead.

This is why you should check the return-path domain before changing your SPF record.

The mistake I see most often is a store adding a second SPF record instead of editing the one it already has. A domain can only have one, so the two cancel each other out and SPF fails for every tool the store sends through, not just the new one.
Desislava Zhivkova
Desislava Zhivkova Head of Deliverability and Compliance Operations at Omnisend
in

Common SPF mistakes

Common SPF mistakes include duplicate records, excessive DNS lookups, and missing senders. Each can cause authentication failures or delivery problems.

  • Publishing multiple SPF records: This causes a permanent error (permerror). Merge the entries into one record for that hostname.
  • Exceeding 10 DNS lookups: SPF evaluation fails when lookup limits are exceeded. Remove unused services and unnecessary “include:” entries.
  • Forgetting a new sending tool: Its emails may fail SPF authentication. Add the sender’s required authorization to the correct SPF record.
  • Switching "~all" to "-all" too early: Legitimate senders may fail SPF. Verify every sending source before enforcing a hardfail policy.

Forwarding can also break SPF because the forwarding server may not be authorized. SPF doesn’t protect the visible From address.

Read our guide to learn how to troubleshoot SPF errors.

How Omnisend handles SPF

Omnisend provides domain authentication records under Store settings → Domains.

Omnisend Store settings with the Domains tab open, showing an unverified email sending domain and an SMS domain with verification in progress
Find domain authentication settings directly in your Omnisend account.

You add the supplied DNS records through your domain provider, then verify them in Omnisend. When you send through Omnisend, the return-path domain is the sender domain you add and authenticate there. Its SPF record uses the value v=spf1 include:mailgun.org ~all. If that domain already has an SPF record, add include:mailgun.org to it instead of publishing a second record.

Omnisend Verify domain step listing the SPF, DKIM and DMARC TXT records to add in GoDaddy DNS settings, with the Finish verification button highlighted
Complete DNS verification to authenticate your sending domain.

Domain authentication is included on every plan. See the SPF, DKIM, and DMARC setup guide for instructions.

FAQ

How do I check my SPF record?

Open a delivered message in Gmail, select Show original, and check the spf= result. Online SPF lookup tools also let you view your domain’s published TXT record and check for errors.

 

What's the difference between ~all and -all?

The ~all mechanism returns a softfail, while -all returns a hardfail. Both mark unmatched senders as unauthorized. Still, receiving servers get to decide how to handle each result. Use -all only after listing and testing every sending tool

 

Are SPF records still used?

Yes. Google requires either SPF or DKIM for all senders, and bulk senders must use both plus DMARC. Yahoo guidelines also mention similar authentication requirements and ask for a valid SPF record.

 

Do I need SPF if I already have DKIM?

Yes. SPF and DKIM validate different parts of an email. Because DMARC requires at least one to pass and align, using both maximizes deliverability.

 

Share term in X
Iryna Shatalo

Iryna leads Product Knowledge Enablement at Omnisend, running the team behind the Help Center and its AI support tools. Years in customer support before that taught her exactly where users get stuck, and she still runs the interviews that keep her guides grounded in how people actually use Omnisend.

Further reading

Keep learning

Email domain authentication: A complete setup guide
Blog
Email domain authentication: A complete setup guide
How to improve email deliverability
Blog
How to improve email deliverability
Authenticate your sending domain in Omnisend

Domain authentication is included on every Omnisend plan, including the free tier — start your store today