How do I add a SPF record?

  1. Log into your Cloudflare Account. 
  2. From the dropdown on the top left, select your domain.
  3. Click the "DNS" link 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 will look something like this:

TXT @ v=spf1 include:example.net -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 here: http://www.openspf.org/SPF_Record_Syntax

If you're unsure, it's worth double-checking with your mail services provider 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, so 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.

Still not finding what you need?

The CloudFlare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.

Powered by Zendesk