How to Set Up SPF for Salesforce

Authorize Salesforce to send marketing and transactional email on behalf of your domain.

Quick Answer — The Record You Need

Record Type

TXT

Host / Name

@

Value
v=spf1 include:_spf.salesforce.com ~all

Add include:_spf.salesforce.com to your existing SPF record.

Step-by-Step Setup

1

Log in to Salesforce

Sign in to your Salesforce org.

2

Check your sending configuration

Determine if you use Salesforce for standard email, Marketing Cloud, or both. Each may have different SPF requirements.

3

Add Salesforce to your SPF record

Add include:_spf.salesforce.com to your existing SPF record.

v=spf1 include:_spf.salesforce.com ~all
4

Configure custom Return-Path (optional)

For better SPF alignment, configure a custom return-path (bounce) domain in Salesforce Setup under Email Administration.

5

Verify the record

Test by sending an email from Salesforce and checking the SPF result in the email headers.

Before & After

Before
v=spf1 include:_spf.google.com ~all
After
v=spf1 include:_spf.google.com include:_spf.salesforce.com ~all

Common Gotchas

  • Salesforce Marketing Cloud may use a different SPF include than core Salesforce. Check Marketing Cloud documentation if you use it.
  • The include is _spf.salesforce.com (with underscore prefix), not salesforce.com.
  • If you use Salesforce with a custom return-path domain, add the SPF record to that subdomain as well.

Verify Your Setup

After adding your DNS records, use our free SPF checker to verify everything is configured correctly. DNS changes typically propagate within minutes, but can take up to 48 hours.

Frequently Asked Questions

What SPF record do I need for Salesforce?

Add include:_spf.salesforce.com to your SPF record.

Is the SPF include the same for Salesforce and Marketing Cloud?

Not always. Core Salesforce uses _spf.salesforce.com. Marketing Cloud may require additional includes depending on your configuration.

Does Salesforce support custom return-path for SPF alignment?

Yes. You can configure a custom return-path domain in Salesforce Setup to improve SPF alignment for DMARC.

Related Guides