How do I add a SPF record?

  1. Log in to your Cloudflare account. 
  2. From the dropdown on the top left, select your domain.
  3. Click the DNS app at the top of the page.
  4. Choose TXT. The SPF format has been deprecated due to the DNS RFC.
  5. Add your SPF record string under the value section and click Add. 

More information on SPF record syntax and formatting is found below. 

You can also add it as a TXT record, which looks something like this:

TXT @ v=spf1 -all

The mechanisms can be prefixed with one of four qualifiers:
"+" Pass
"-" Fail
"~" SoftFail
"?" Neutral

Evaluation of an SPF record can return any of these results:

Result Explanation Intended action
Pass The SPF record designates the host to be allowed to send. accept
Fail The SPF record has designated the host as NOT being allowed to send. reject
SoftFail The SPF record has designated the host as NOT being allowed to send but is in transition. accept but mark
Neutral The SPF record specifies explicitly that nothing can be said about validity. accept
None The domain does not have an SPF record or the SPF record does not evaluate to a result. accept
PermError A permanent error has occurred (e.g. badly formatted SPF record). unspecified
TempError A transient error has occurred. accept or reject

More information on the SPF Record Sytanx can be found at:

If you're unsure, double-check with your mail services provider about what the value should be.

Although most DNS providers (Cloudflare included) support the dedicated SPF record types, some DNS clients may not support it yet and look for the TXT record instead.  Our recommendation is to set up both a SPF record and a TXT record on your domain to ensure backwards compatibility.

Read more about Cloudflare's DNS services.

Not finding what you need?

95% of questions can be answered using the search tool. This is the quickest way to get a response.

Powered by Zendesk