Skip to content
iBlockSpam
SPF by provider

SPF record for Salesforce

When Salesforce sends email from your domain, Salesforce Help says to include _spf.salesforce.com in your SPF record, for example v=spf1 mx include:_spf.salesforce.com ~all. Use only that include; other salesforce.com SPF records don't apply to mail sent from the Salesforce application. We measured it at 2 DNS lookups.

Include
include:_spf.salesforce.com
Where it goes
Your domain (@)
DNS lookups
2 of 10 (measured October 9, 2026)

The exact SPF record

Copy the example that matches your setup. Each one is a single TXT record; the host is shown as your DNS provider usually expects it (@ means the domain itself).

Salesforce's example

Type: TXT · Host: @ · 3 of 10 DNS lookups

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

Salesforce and Microsoft 365

Type: TXT · Host: @ · 3 of 10 DNS lookups

v=spf1 include:spf.protection.outlook.com include:_spf.salesforce.com -all

Salesforce and Google Workspace

Type: TXT · Host: @ · 3 of 10 DNS lookups

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

How SPF applies to Salesforce mail

Receivers check SPF against the domain in the envelope sender (the MAIL FROM or bounce address). Salesforce sends with your own domain there, so its include belongs in the SPF record on the domain you send from.

  • This applies to Salesforce Classic and Lightning Experience in all editions except Database.com.
  • Salesforce's example keeps mx in the record. Keep mx only if your MX hosts also send mail as your domain; if your MX points to a filtering service, mx adds a lookup without authorizing your real senders.
  • _spf.salesforce.com uses an exists mechanism with a macro, so the lookup it makes depends on the sending IP address. We measured 2 lookups in total.

How to add it

  1. Check whether you use Salesforce's Email Security Compliance setting: Salesforce recommends this SPF setup if you don't enable it.
  2. There's nothing to paste inside Salesforce itself. At your DNS host, find the TXT record on @ that starts with v=spf1. Create one first if you don't have it.
  3. Add include:_spf.salesforce.com to the record and save.
  4. Check the live record with the SPF Checker below.

DKIM and DMARC alignment

SPF only checks the envelope sender. For DMARC, also set up DKIM signing for your domain in Salesforce (Salesforce Help documents DKIM keys separately), then publish a DMARC record.

DMARC passes when SPF or DKIM passes and the domain it checked matches your From domain. Our guide to SPF, DKIM and DMARC explains how the three fit together.

Common mistakes

  • Two SPF records. A domain may publish only one record that starts with v=spf1. With two, receivers return a permanent error and SPF fails for all your mail (RFC 7208 section 3.2). Merge every sender into one record.
  • More than 10 DNS lookups. Each include, a, mx, exists and redirect costs a lookup, nested ones included; over 10 is a PermError (section 4.6.4). Salesforce's include costs 2 on its own. See how to fix too many SPF lookups.
  • Choosing ~all or -all without a plan. Salesforce's documentation uses ~all. -all asks receivers to reject unlisted servers; ~all asks them to accept but mark the mail. Once DMARC is enforced, receivers act on DMARC instead. Read SPF soft fail vs hard fail before you choose.
  • Adding other salesforce.com SPF records you find in DNS. Salesforce says only _spf.salesforce.com is relevant to mail sent from Salesforce.

Check your SPF record

See your live record, every nested include and the real lookup count. Free, reads public DNS only.

Building a new record? Open the SPF Record Generator with Salesforce filled in.

Frequently asked questions

What is the SPF include for Salesforce?

include:_spf.salesforce.com. Salesforce Help gives the example v=spf1 mx include:_spf.salesforce.com ~all. Add the include to your existing SPF record rather than publishing a second one.

When do I need to add Salesforce to my SPF record?

When Salesforce sends email using your domain. Salesforce recommends this setup if you don't enable its Email Security Compliance setting.

How many DNS lookups does Salesforce's include use?

We measured 2 on 9 October 2026: the include itself plus one exists check. That leaves room for your mailbox provider and several other services within the limit of 10.

Sources

Values checked against Salesforce's documentation on October 9, 2026. Lookup counts measured with our SPF Checker on October 9, 2026; providers change their records, so check yours before relying on a number.

SPF records for other providers

Compare every provider's include in one table

Last updated