Technical setup

How to Configure an SPF Record on Cloudflare Step-By-Step

Noel
LAST UPDATED
January 16, 2025
READING TIME
7 min.

When trying to land your emails in your audience’s inbox, you need every help you can get.

By setting up certain DNS records for your domain, you can significantly improve the security and deliverability of your emails, increasing your chances of avoiding spam.

One such record is SPF. It ensures emails can only be sent from selected email servers.

Today, we’ll show you how to set up an SPF record on Cloudflare.

What is SPF❓

Sender Policy Framework lets you specify what servers you authorize to send emails on your behalf.

Typically, these would be servers of your email service providers.

Here’s how SPF authentication works:

If email servers receive an email that apparently comes from your domain, they check if the sending server appears in your SPF.

If it does, the email is delivered normally.

But if it doesn’t, the email will be rejected. Exactly what to do with the email is determined by your SPF and DMARC settings.

SPF can potentially increase your open rates and enhance email security, but it’s not mandatory.

However, if you’re serious about email outreach, you need SPF.

How to Add a SPF Record to Cloudflare 📝

Check for existing SPF records

With you knowing, your domain might already have an SPF record set up.

You don’t want to have multiple SPFs because that could cause authentication complications.

Go to your domain provider’s DNS settings and look for a line of text similar to the one below:

v=spf1 include:spf.protection.somesendingdomain.com -all

The include tag holds the server that’s allowed to send emails through your domain.

If you use multiple services to send email, you can add more servers by adding more include tags followed by the email server.

Check out the example below:

v=spf1 include:spf.protection.somesendingdomain.com  include:_spf.google.com -all

Notice how we now have two include tags in the record.

If you’re new to SPF, the record may seem complicated, but the good news is that, typically, your ESP will give you the record. (Go to your ESPs account, and look for email or domain authentication settings.)

This is particularly handy when you haven’t yet set up an SPF record.

If you do have one, you must copy and paste their email server from their SPF into the SPF in your domain’s DNS.

Don’t forget the include tag!

Add your SPF record to Cloudflare

If your SPF record is ready, it’s time to add it to Cloudflare.

Steps ⬇️

  1. ➡️ Log in to your Cloudflare account
  2. ➡️ On the dashboard, find your domain and click on it
  3. ➡️ Click the DNS button
  4. ➡️ Now, create a new DNS record
  5. ➡️ In the Type field, select TXT
  6. ➡️ Add @ the the Name field
  7. ➡️ Paste your SPF record in the Value field. For example, if you send emails through Office 365, your SPF record will look like this: v=spf1 include:spf.protection.outlook.com -all
  8. ➡️ Save your record

Completing Your Technical Setup ✔️

DNS record changes can take 48 hours to complete.

You can verify your SPF record using this free deliverability checker. It doesn’t just check your SPF configuration but goes through your complete technical setup.

It’ll tell you if you have:

  • ➡️ Your SPF records set up
  • ➡️ Your DKIM records in order
  • ➡️ Your DMARC ready to go
  • ➡️ Your Custom Tracking Domain configured

Lastly, if your email or sending domain is new, or your outreach suffers from low open rates…

Then, you need to warm your email up.

An email warm-up service like lemwarm can do this vital task for you.

The best part is that once set up, it runs hands-off.

Noel

What you should look at next

What you should look at next

Technical setup
How to Set Up an SPF Record for Office 365 - Step-by-Step Guide
Learn how to set up SPF for Office 365 to authenticate your emails and improve open rates. Our step-by-step guide will help you set up your record on different domain providers.
Technical setup
How to Set Up an SPF Record for Google Workspace
Learn how to set up an SPF record for Google Workspace to boost your email open rates and enhance email security. Our step-by-step guide will show you how to configure it on popular domain providers.
Technical setup
How to Configure an SPF Record for Zoho Mail
Learn how to set up an SPF record for your Zoho Mail account to boost open rates and prevent phishing attacks. Follow step-by-step instructions for various domain providers, including GoDaddy, Namecheap, and Cloudflare.
Technical setup
How to Quickly Add an SPF Record to GoDaddy
Learn how to set up an SPF record on GoDaddy. Follow our step-by-step instructions to avoid the spam folder and enhance email security.
Technical setup
How to Add a SPF Record to Namecheap
Learn how to set up an SPF record on Namecheap to enhance email security and avoid spam. Follow our step-by-step guide to authenticate your emails and improve email deliverability.
Technical setup
How to Set Up an SPF Record in Your OVH Account
Learn how to set up an SPF record for your domain on OVH. Follow our step-by-step guide to boost deliverability and enhance email security.
Email Deliverability
SPF generator - Create your SPF record in a few clicks
Easily create your SPF record with our SPF generator. Specify your email service provider and get a ready-to-use SPF record to boost email deliverability and security.

Send emails that actually get delivered with lemwar...