- Log in to your Cloudflare account.
- From the dropdown on the top left, select your domain.
- Click the DNS app at the top of the page.
- Choose TXT. The SPF format has been deprecated due to the DNS RFC.
- 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 include:example.net -all
The mechanisms can be prefixed with one of four qualifiers:
Evaluation of an SPF record can return any of these results:
|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: http://www.openspf.org/SPF_Record_Syntax.
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.