Adding SPF record for Salesforce


Our clients login to a Salesforce “community” site and instead of a password, they are emailed a security code for each login. However, some domains are blocking these emails as spam. Our Salesforce partner recommended that we set up a SPF record.

I have used this Salesforce support article as a reference, but I know I am missing something. I am not sure what to enter in the content field for the SPF field. Is it “v=spf1 mx ~all”?

Thank you.

The SPF record should be entered in a TXT record. (I know there is an SPF DNS record type, just ignore that, it needs to be TXT.) If you already have an SPF record, just append before the all statement at the end of the record.

The name should be the name of the subdomain that Salesforce are sending mail from, or @ if they are sending from the root of your domain. A typical record would look like this:

If you do not already have an SPF record, you need to be careful that you do not accidentally block legitimate sources of email. There are plenty of resources on the web to help set up SPF. I would recommend Enabling DMARC in report-only mode to start capturing data. Report-URI or Dmarcian offer a free tier that will help with that.


Just to add here, from Managing DNS records in Cloudflare – Cloudflare Help Center

Although Cloudflare and most other DNS providers support the dedicated SPF record types, some DNS clients may instead look for a TXT record . Add both an SPF record and a TXT record to your domain to ensure backwards compatibility.

Thank you for the replies.

I admit that I am not nearly technical enough to understand all of this. I do understand that I need to remove the SPF record and add a TXT record instead. But I’m still not sure what to enter in the content field.

When I look at the screenshot that was provided by @michael I still do not know what I should include between v=spf1 mx and ~all

Thank you.

This may be best confirmed in your Salesforce account and/or email administrator, but there is also documentation at regarding SPF records for Salesforce:

As an example, an SPF record would be similar to:

v=spf1 mx ~all

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.