Opens in a new tab

Salesforce SPF, DKIM and DMARC setup

Salesforce sends email from your org with its servers, so it needs include:_spf.salesforce.com in your SPF record and a DKIM key created under Setup → DKIM Keys. When bounce management is on, the bounce address becomes Salesforce’s own, and DKIM is what carries DMARC.

SPFinclude:_spf.salesforce.com
DKIMTwo CNAMEs, selectors you choose
Bounce domainbnc.salesforce.com when bounce management is on
Set up inSetup → DKIM Keys

Is your domain set up for Salesforce?

We read your SPF record, look for Salesforce’s DKIM key and check DMARC. Nothing is stored.

SPF for Salesforce

Salesforce’s record is include:_spf.salesforce.com, added to your existing SPF record. Salesforce advises against listing its IP addresses yourself.

If you have no SPF record yet, publish this TXT record on @ (the domain itself):

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

If you already have one, add include:_spf.salesforce.com to it, before the ~all or -all at the end. A domain must have exactly one SPF record: a second one makes both fail.

include:_spf.salesforce.com uses 2 of the 10 DNS lookups an SPF record is allowed (measured 27 September 2026). Past 10, receivers fail SPF for all of your mail. What is inside include:_spf.salesforce.com, and whether you need it →

DKIM for Salesforce

In Setup, search for DKIM Keys → Create New Key. Choose a selector and an alternate selector (letters, digits and hyphens), a 2048-bit key, and your email domain. Publish both CNAME records, then Activate — the button stays disabled until Salesforce sees both.

Salesforce hosts the keys and rotates them through the alternate selector, so both CNAMEs must stay published.

NameTypeValue
<selector>._domainkeyCNAME<selector>.<random>.custdkim.salesforce.com
<alternate selector>._domainkeyCNAME<alternate selector>.<random>.custdkim.salesforce.com

The exact values come from Salesforce; copy them from there. Placeholders are in angle brackets.

Bounce domain and DMARC

With bounce management or Email Relay on, the bounce address is a bnc.salesforce.com address, so SPF cannot align; Salesforce’s own advice is DKIM, which aligns because it signs for your domain.

No DMARC record yet? Start with one that only reports, read the reports for a couple of weeks, then tighten it: build it with the DMARC generator.

Common mistakes

  • Creating the key for your My Domain name instead of the domain you send email from.
  • Keys do not carry over between orgs, and must be created again after a sandbox refresh.
  • DNS can take up to 72 hours before Activate becomes available.

Questions

Why two selectors?

Salesforce rotates the key through the alternate selector. Both CNAMEs have to stay published for rotation to work.

Sources

Checked against Salesforce’s own documentation on 25 September 2026:

See every service’s mail pass or fail

Point your DMARC reports at us and we name every server sending as your domain, with what passes, what fails and the exact fix. Free for your first domain.

Create a free account