Suped

How to set up DMARC/DKIM/SPF for Salesforce

Published 6 Jul 2026
Updated 6 Nov 2026
15 min read
Summarize with
Salesforce SPF, DKIM, and DMARC setup with email authentication DNS records.
Updated on 6 Nov 2026: We updated the Salesforce setup steps for current domain verification requirements, sandbox handling, and authentication checks across sending paths.
Salesforce email authentication has separate DNS and platform checks: verify every exact sending domain in Salesforce, publish Salesforce DKIM CNAME records, authorize the applicable Return-Path domain with SPF, and publish a DMARC TXT record at _dmarc. Start with DKIM because it can satisfy DMARC even when Salesforce uses its own Return-Path, then use SPF and DMARC reporting to catch authentication failures after configuration changes.
Salesforce's SPF and DKIM FAQ recommends both SPF and DKIM. For DMARC, at least one method must pass with a domain that matches the visible From domain under DMARC rules.
  1. Verify each domain: Use an active DKIM key or a verified Authorized Email Domains entry for every exact domain and subdomain used in a From address.
  2. Use Salesforce records: Create DKIM keys in Salesforce Setup, then publish the exact CNAME targets Salesforce gives you.
  3. Use one SPF record: When Salesforce uses your domain in the Return-Path, add include:_spf.salesforce.com to the existing SPF TXT record, not a second SPF record.
  4. Use DMARC reports: A monitor policy tells you whether Salesforce, users, automations, and relays pass before you enforce.

Confirm your Salesforce sending path

The DKIM Keys and _spf.salesforce.com instructions below apply to core Salesforce email, including Sales Cloud and Service Cloud. Confirm which system sends each message before publishing DNS records; configuring CRM authentication does not authenticate every Salesforce product.

Sending path

Authentication to configure

Send through Salesforce
Use Salesforce Setup > DKIM Keys, the applicable SPF record, and your domain's DMARC policy.
Email Relay
Verify the From domain in Salesforce. At the recipient, SPF checks the final relay IP against the Return-Path domain. For DKIM, preserve Salesforce's signature or have the relay sign with your From domain.
Send through Gmail or Office 365
These messages use the connected mailbox provider's authentication. Workflow and system emails can still use Salesforce or Email Relay, so test those separately.
Marketing Cloud Engagement
Use its Sender Authentication Package (SAP) or Private Domain setup and the DNS records supplied for that account.
Account Engagement (Pardot)
Use Account Engagement Settings > Domain Management > Email Sending Domains. Publish the validation and DKIM entries shown there; SPF is configured by Salesforce for this product.
Authentication setup depends on the product and outbound route.
For Email Relay, changes to signed headers or the message body can break Salesforce DKIM. Preserve the signed content or configure the relay to sign the final message with your domain. Adding include:_spf.salesforce.com does not authorize the relay's IP address.

Prepare your Salesforce sending domains

Start by inventorying every exact domain used in a visible From address. Add the sending domain when you create DKIM keys, then verify any user addresses, return addresses, and organization-wide From addresses used by people or automation. Address verification does not replace Salesforce's domain-level verification. Managing DKIM keys requires the Customize Application permission and access to publish records in your domain's DNS.
Create a Salesforce DKIM key with 2048-bit RSA, primary and alternate selectors, and an exact domain match.
Create a Salesforce DKIM key with 2048-bit RSA, primary and alternate selectors, and an exact domain match.
  1. Choose the From domain: Use the exact domain in the visible From address, such as example.com or mail.example.com.
  2. Open setup: In Salesforce, go to Setup, search for DKIM Keys, then open Email DKIM Keys.
  3. Create the domain key: Click Create New Key and enter the sending domain, not the Salesforce org domain.
  4. Match the pattern: Use the exact domain in both the Domain and Domain Match Pattern fields so DKIM signs mail from that domain and satisfies Salesforce verification. Avoid wildcard patterns; create a separate key for each subdomain.
  5. Verify org-wide senders: If users send from shared addresses, open Organization-Wide Addresses and complete the address verification for each one.
  6. Document ownership: Record who controls DNS, Salesforce Setup access, and release windows before you edit records.
Domain mapping checklist
Before DNS changes, map each Salesforce sender to one visible From domain and its actual Return-Path. This prevents a clean DKIM setup on example.com while automations send from alerts.mail.example.com.
  1. Header From: Verify the exact domain that users see in the From address.
  2. Return-Path: Record the envelope-sender domain because SPF is checked against it, not the visible From domain.
  3. DKIM domain: Use your exact sending domain in Salesforce so the active key verifies that domain and signs its mail.

Item

Where

Value

Sending domain
From address
example.com
Domain verification
Salesforce Setup
Active DKIM or verified domain
SPF
Return-Path domain
One TXT
DKIM
DKIM Keys
Two CNAMEs
DMARC
_dmarc
One TXT
Salesforce authentication records to prepare.

Verify every sending domain

For core Salesforce email sent directly or through Email Relay using a domain your organization owns, domain-level verification is required. An individually verified user address or organization-wide address is not enough. Verify every exact domain and subdomain with an active DKIM key or a verified entry under Authorized Email Domains before relying on it in production.
  1. Inventory sending domains: In Winter '27, open Setup > User Email Domains and click List Domains for active users' email and return address domains. Also check email logs, organization-wide addresses, Email-to-Case routing addresses, and Experience Cloud site sender addresses.
  2. Prefer active DKIM: An active key for the exact From domain verifies ownership and also signs outbound messages.
  3. Use the fallback when needed: If DKIM cannot be configured, open Setup, Authorized Email Domains, add the domain, publish Salesforce's generated TXT verification code, and complete verification. This TXT entry verifies ownership; it does not sign email or satisfy DMARC.
  4. Repeat for subdomains: Verifying example.com does not verify mail.example.com, so add each subdomain that appears after the @ symbol.
  5. Check sandboxes: New and refreshed sandboxes need their own DKIM keys and CNAMEs. Alternatively, select Allow copy to sandbox for each verified Authorized Email Domains entry in production, then click Import from Production in the sandbox. Importing domain verification does not copy DKIM signing keys.
  6. Confirm status: Check that the DKIM key is active or the Authorized Email Domains entry is verified before testing delivery.
Unverified domains can stop delivery
In Setup > Deliverability, Use a substitute email address for unverified domains is enabled by default. Select an eligible verified organization-wide address as the substitute, or Salesforce uses email@UniqueId.sfcustomeremail.com. This changes the From address without verifying the original domain. If org-level substitution is disabled and no site-specific substitution applies, messages using an unverified domain are not delivered, sometimes without a visible error.
If Salesforce Customer Support previously disabled user email verification for your org, configure the corresponding Authorized Email Domains settings before December 1, 2026. The Winter '27 Maintain Your Email Verification Exception release update removes the legacy support-managed exceptions on that date. This address-verification exception does not replace domain ownership verification.

Set up SPF

SPF is checked against the envelope sender, which appears as the Return-Path after delivery. When Salesforce sends directly with your domain in that path, publish or edit one SPF TXT record for that domain and add include:_spf.salesforce.com. Use that exact include because other Salesforce SPF records do not authorize mail sent by the Salesforce application.
  1. Find the SPF TXT: In DNS, look for a TXT record that starts with v=spf1 at the domain used in the Return-Path.
  2. Add Salesforce: Insert include:_spf.salesforce.com before the final all mechanism.
  3. Keep one SPF record: Multiple v=spf1 TXT records at one domain make SPF return a permanent error, even when each record looks valid.
  4. Check DNS lookups: Salesforce's include consumes DNS lookups, so keep the full SPF evaluation, including nested includes, within the ten-lookup limit. Use the maintained include rather than copying Salesforce IP addresses into your record.
  5. Inspect Return-Path: If it ends in bnc.salesforce.com because Bounce Management or Email Security Compliance is enabled, your domain's SPF cannot match the visible From domain under DMARC rules. Use DKIM with matching domains for DMARC.
SPF record for SalesforceDNS
v=spf1 include:_spf.salesforce.com ~all
Merged SPF example with a placeholder includeDNS
v=spf1 include:spf.mailhost.example include:_spf.salesforce.com ~all
In the merged example, replace spf.mailhost.example with your existing provider's actual include and retain your existing ~all or -all ending. After saving DNS, run the SPF checker against the domain where you published the record. Then send a real message and compare that domain with the Return-Path so you know the tested record participates in the live path.

SPF checker

Find SPF syntax issues, lookup limits, and weak records.

?/16tests passed
If the checker fails, fix the SPF syntax, duplicate records, or lookup count. DKIM can still carry DMARC, but a broken SPF record affects other systems that use the same envelope domain and makes troubleshooting harder.
SPF failure patterns
  1. Duplicate SPF: Merge extra v=spf1 TXT records at the same host into one valid policy.
  2. Wrong host: Publish SPF at the envelope-sender domain shown in the Return-Path, not automatically at the visible From domain.
  3. Lookup limit: Remove unused includes or restructure the record when SPF exceeds ten DNS lookups.
  4. Return-Path mismatch: A Salesforce-owned Return-Path can pass SPF for Salesforce but does not match your From domain under DMARC rules, so DMARC needs DKIM with matching domains.

Set up DKIM

DKIM is the main Salesforce pass condition to prioritize. In Salesforce, generate a 2048-bit DKIM key for the exact From domain, publish both CNAMEs, then activate the key once Salesforce can see those records. An active key also satisfies Salesforce's domain-level verification requirement for that exact domain.
Salesforce DKIM key activation after publishing the primary and alternate CNAME records.
Salesforce DKIM key activation after publishing the primary and alternate CNAME records.
  1. Open DKIM Keys: Go to Setup, Email, DKIM Keys.
  2. Create a key: Click Create New Key and choose 2048-bit unless a specific application requires a smaller key.
  3. Set selectors: Use unique selector names such as sf1 and sf2. Use different selectors for production, sandboxes, and other orgs sharing the domain to avoid CNAME conflicts. Salesforce uses the alternate selector for automatic key rotation.
  4. Enter the domain: Use the exact visible From domain or subdomain Salesforce sends from.
  5. Publish CNAMEs: After saving, wait for the CNAME Record and Alternate CNAME Record fields to appear, usually within 15 minutes. Copy both generated host and target values into DNS exactly; do not reuse another org's targets.
  6. Activate the key: Return to Salesforce after DNS propagation and click Activate. Salesforce says propagation can take up to 72 hours.
Salesforce DKIM CNAME shapeDNS
Host: sf1._domainkey.example.com Type: CNAME Value: copy the first Salesforce target Host: sf2._domainkey.example.com Type: CNAME Value: copy the second Salesforce target
DKIM pass target
A real Salesforce message should show DKIM pass with d=example.com or the exact subdomain you authenticated. A d=salesforce.com signature does not satisfy DMARC for a From address at your domain.
  1. Selector check: The s= selector in the DKIM-Signature header should match the primary or alternate selector in your active Salesforce key configuration.
  2. Domain check: For Salesforce verification, the DKIM domain must match the entire domain in the visible From address.
  3. Activation check: A saved key is not enough; the Salesforce key must be active.
  4. Rotation check: Keep both CNAMEs published because Salesforce rotates between the primary and alternate keys every 30 days.

Set up DMARC

DMARC is the domain policy receivers check after SPF and DKIM. For From addresses at example.com, publish a TXT record at _dmarc.example.com. For a sending subdomain, first check its own _dmarc record and any applicable parent policy. Start at p=none for a new rollout unless the domain already has an enforcing policy; keep existing p=quarantine or p=reject protection while fixing Salesforce.
  1. Check first: Search DNS for an existing _dmarc TXT record before adding anything.
  2. Use one record: A domain must have one DMARC TXT record at _dmarc.
  3. Set reporting: Replace dmarc@example.com with the aggregate-report address supplied by your reporting service or a mailbox you control. An external reporting domain must authorize reports for your domain when required by DMARC.
  4. Keep enforcement: Do not reduce p=quarantine or p=reject just to make Salesforce easier.
  5. Generate safely: Use the DMARC record generator if you need a clean starting value.
Starter DMARC TXT value at _dmarc.example.comDNS
v=DMARC1; p=none; rua=mailto:dmarc@example.com
After publishing, check the record at the public DNS layer. The Salesforce UI does not validate DMARC for the whole domain; DMARC covers every sender using that domain.

DMARC checker

Look up a domain's DMARC record and catch policy issues.

?/7tests passed
A passing DMARC result needs SPF or DKIM to pass with a domain that matches the visible From domain under the policy's domain-matching rules. Relaxed mode, the default, permits a shared organizational domain; adkim=s or aspf=s requires an exact match for that method. Salesforce's own sending-domain verification requires the exact From domain or subdomain regardless of DMARC mode.
Do not relax a live policy
If your domain already uses p=quarantine or p=reject, keep it. Fix Salesforce DKIM and SPF until Salesforce passes under the current policy.
  1. Existing enforcement: Treat failed Salesforce mail as a configuration problem, not a reason to weaken policy.
  2. New domains: Start at p=none, collect reports, then move up after legitimate senders are known.
  3. Subdomains: Check _dmarc at the exact From domain first. If no valid policy is found, RFC 9989 uses a DNS tree walk to discover an applicable parent policy; legacy receivers use organizational-domain lookup. Publish a subdomain record when it needs an explicit policy or separate reporting.

Verify Salesforce authentication and troubleshoot delivery

After DNS propagation, verify at four layers: public DNS, Salesforce domain verification, DKIM activation, and a real message header. Send a Salesforce notification to an external inbox because a successful Setup status does not prove receiving systems see the same route.
Generate a real test message with the same Salesforce feature your users rely on, such as Flow, Case notifications, email alerts, or list email. If the org uses an email relay, test both a route that uses the relay and any route that can send directly through Salesforce.

Email tester

Send a real email to this address. Suped shows a results button when the test is ready.

?/43tests passed
Use the test result to inspect SPF, DKIM, DMARC, Return-Path, DKIM selector, and the visible From domain. Then compare that message against DMARC aggregate reports after receivers begin sending them. Reports are delayed and cover participating receivers; they are not a complete message log. An authentication pass does not guarantee inbox placement.
  1. Confirm domain verification: The exact From domain must have an active DKIM key or a verified Authorized Email Domains entry.
  2. Send real mail: Trigger the exact Salesforce feature and route that sends production mail.
  3. Inspect results: Read Authentication-Results for SPF, DKIM, and DMARC.
  4. Check DKIM domain: Confirm the d= value uses your exact sending domain and meets the DMARC domain-matching rules for the visible From address.
  5. Check SPF domain: Confirm the Return-Path domain and determine whether its SPF pass uses a domain that matches the visible From domain under DMARC rules.
  6. Compare reports: DMARC aggregate reports should show Salesforce traffic passing after DNS has propagated.

Symptom

Likely cause

Fix

Message not delivered
From domain or address unverified, or sending restricted
Verify the exact domain and address, then check Setup > Deliverability > Access to Send Email. New and refreshed sandboxes default to System email only; enable All email only for planned external testing.
DKIM fail
Incorrect DNS or signed content changed by a relay
Verify both CNAMEs and compare the message before and after the relay. Preserve signed content or have the relay sign the final message with your domain.
DKIM none
Inactive key, wrong domain match pattern, or another sending route
Activate the key, check the exact From domain and match pattern, and confirm the message used the expected route.
SPF fail
The final sending IP is not authorized for the Return-Path domain
Check the actual Return-Path and final sending IP. Update the applicable SPF policy; the Salesforce include does not authorize an external relay.
DMARC fail
Neither SPF nor DKIM passed with an acceptable domain match
Get a passing DKIM signature using your exact From domain, then check adkim and aspf if strict matching is configured.
Common Salesforce authentication failures.
Salesforce checks
  1. Domain status: The exact From domain is verified.
  2. Key status: The DKIM key shows active, not saved or pending.
  3. Sender path: The same feature and route that failed are used for the retest.
DNS and header checks
  1. SPF result: SPF passes for the Return-Path domain; the DMARC domain match is checked separately.
  2. DKIM result: DKIM passes with your exact sending domain in d=.
  3. DMARC result: DMARC passes; a disposition of none on passing mail is normal even when the published policy is p=reject.

Monitor Salesforce authentication changes

Salesforce authentication can break after a new sandbox, a changed DNS provider, an email relay change, or automation that uses a different From domain. Manual checks catch setup errors once. Monitoring catches later regressions.
  1. Watch source IPs: A new Salesforce source can appear when routing or org configuration changes.
  2. Watch DKIM: A deleted CNAME or inactive key turns valid Salesforce mail into DMARC failures.
  3. Watch SPF: SPF lookup changes outside Salesforce can break the whole envelope domain.
  4. Watch volume: Unexpected Salesforce volume usually means a new automation or sender path needs review.
  5. Watch reputation: Blocklist (blacklist) signals help explain delivery drops after authentication is fixed.
Suped's DMARC monitoring parses aggregate reports into Salesforce source activity and SPF or DKIM results. Use Suped's product to review changes after deployments and investigate authentication alerts alongside real message headers.

Secure your domain with p=reject

Move to p=reject after Salesforce has passed for normal traffic and every other legitimate sender is accounted for. This policy asks receivers to reject messages that fail DMARC; receivers still apply their own handling rules.
Policy rollout thresholds
Use these checks before changing the DMARC policy on a Salesforce sending domain.
Monitor
p=none
Use while Salesforce DKIM and SPF are being validated.
Contain
p=quarantine
Use after Salesforce and other known senders pass consistently.
Block
p=reject
Use when remaining failures are unauthorized or retired senders.
  1. Prove Salesforce: Salesforce DKIM passes for real production messages across normal traffic.
  2. Review all sources: Use DMARC reports and your sender inventory to account for every legitimate platform using the domain.
  3. Quarantine first: Use p=quarantine before p=reject when the domain has broad business use.
  4. Move to reject: Switch to p=reject after legitimate failures are resolved and remaining traffic is confirmed unauthorized or from retired senders.
  5. Keep alerts on: A reject policy needs alerting so a future Salesforce change does not become a delivery incident.
Suped's Hosted DMARC supports this rollout when DNS access is slow or split across teams. Publish the hosted record once, then coordinate policy changes in Suped without opening a DNS ticket for every stage.

FAQ

Salesforce recommends both SPF and DKIM, but one passing method with the required domain match is enough for DMARC. SPF helps when Salesforce uses your domain in the Return-Path. When Bounce Management or Email Security Compliance uses a Salesforce-owned Return-Path, a passing DKIM signature with your From domain normally satisfies DMARC.

Compare the reported source IP with a known Salesforce message, then check its SPF domain and DKIM d= value. Reverse DNS is a clue, not proof of authorization. For relayed messages, the report normally shows the relay's sending IP rather than a Salesforce IP.

It authorizes the Salesforce application mail servers referenced by Salesforce's SPF policy. Add it only to the single SPF record for a domain that Salesforce uses as the envelope sender.

Yes. An active DKIM key verifies the exact domain entered in the key when it matches the entire domain in the From address. Verify each subdomain separately.

Use p=none for a new DMARC rollout so reports show whether Salesforce passes. If the domain already uses p=quarantine or p=reject, keep that policy and fix Salesforce until it passes.

Check for a duplicated domain in the CNAME host, an incorrect target, the wrong DNS zone, or selectors already used by another org. Publish both generated CNAMEs; Salesforce says DNS propagation can take up to 72 hours. If the CNAME fields have not appeared yet, wait for Salesforce's initial key publishing to finish, usually within 15 minutes.
DMARC monitoring

Start monitoring your DMARC reports today

Suped DMARC platform dashboard
What you'll get with Suped
Real-time DMARC report monitoring and analysis
Automated alerts for authentication failures
Clear recommendations to improve email deliverability
Protection against phishing and domain spoofing