Email source6 min read · Updated Jun 2026

Configure SPF and DKIM for Salesforce

Salesforce can send email on your behalf from Marketing Cloud, Sales Cloud, and Service Cloud. SPF is a single include, and DKIM keys are generated inside Salesforce Setup, then published to DNS.

Step 1: Authorise with SPF

Authorise Salesforce’s sending infrastructure:

TXT
Host@ (yourcompany.com)
Valuev=spf1 include:_spf.salesforce.com ~all
Provider note

Marketing Cloud customers may use a dedicated Sender Authentication Package (SAP) with its own subdomain. In that case, follow the SAP’s SPF guidance instead of the root-domain include.

Step 2: Sign with DKIM

Salesforce generates the DKIM key for you. You publish the CNAME records it provides. Salesforce hosts the key, so it can rotate without you touching DNS again.

  1. 1
    In Salesforce, go to Setup → Email → DKIM Keys and click Create New Key.
  2. 2
    Choose RSA 2048, set the selector and domain, and save. Salesforce shows two CNAME records.
  3. 3
    Publish both CNAMEs, then return and set the key to Active.
CNAME
Hostselector1._domainkey
Points toselector1.<key-id>.yourcompany.com.dkim1.sfdc.net
CNAME
Hostselector2._domainkey
Points toselector2.<key-id>.yourcompany.com.dkim2.sfdc.net
Provider note

The key only signs mail once its status is Active. Use the exact selector and target values from the DKIM Keys page.

Step 3: Verify alignment in ClearDMARC

Once DNS has propagated, open the Sources view in ClearDMARC. Salesforce should now show PASS · aligned for both SPF and DKIM. If it still shows a fail, the DKIM step usually needs more time or the provider’s wizard hasn’t been marked complete.

Running the full ClearAuth suite? ClearSPF and ClearDKIM host these records for you, so you add Salesforce once in the console and never edit DNS by hand again.

Was this guide helpful?