How to Set Up an SPF Record - Step-by-Step Guide

Email authentication methods boost your open rate.

One such authentication method is SPF.

SPF helps keep your emails out of spam because internet service providers appreciate the security of your emails.

We’ll show you how to set up an SPF record today.

What Is an SPF Record?  ⁉️

An SPF record (Sender Policy Framework) is a special type of DNS record that tells email providers which servers can send emails on your domain's behalf.

This reduces the risk of spammers using your domain to send harmful emails.

This mechanism also verifies the authenticity of your emails, which boosts your emails’ chances of getting delivered.

An SPF record looks like this. ⬇️

v=spf1 -all

The v stands for version. There are two SPF versions, but SPF 2 is not really used, so for now, this is always spf1.

The include tag holds the server you authorize to send email through your domain.

-all stands for hard fail. If an email fails authentication, it is rejected and not delivered to the recipient.

The other potential setting here is ~all. This is a less strict policy, meaning servers can mark emails as suspicious but still deliver them.

Why Do You Need to Set up Your SPF?

You need to set up your SPF to:

  1. ➡️ Prevent email spoofing: An SPF record can stop unauthorized hosts from sending emails pretending to be from your domain. If you don't have an SPF record, it's easier for bad actors to fake your domain name in phishing or spam emails.‍
  2. ➡️ Get your emails delivered: Emails sent from domains without SPF records set up have a higher chance of being marked as spam or not being delivered at all. Creating an SPF record ensures your emails are successfully delivered to your audience.‍
  3. ➡️ Keep a high sender reputation: Even when you aren't sending emails, having an SPF record can help keep your sender reputation safe by protecting it from being marked as spam.

Who Needs to Set up Their SPF Record?

You need to set up your SPF if you're a:

  1. ➡️ Custom domain user: For high deliverability, you should send campaigns from a custom domain (e.g., If you do, ensure to set up an SPF record to avoid spam and protect your sender reputation.‍
  2. ➡️ Service provider or developers: Companies that host websites, provide email services, sell online, or create software should ensure their users' emails don't go to spam by setting up their SPF or ensuring users do it themselves.
  3. ➡️ Managed and enterprise solutions: Companies that use managed email systems, enterprise CRMs, or other professional platforms to send emails from custom domains should use SPF to ensure that emails are authentic and can be delivered.

How to Set up an SPF for Specific Email Providers

We have detailed tutorials on how to:

Set up an SPF record for Office 365

Configure an SPF record for Google Workspace

Enable an SPF record for Zoho Mail

How to Set up an SPF Record on Specific Domain Providers

We also have instructions on easily setting up SPF on popular domain providers. We have articles on how to:

Add an SPF record to GoDaddy

Set up an SPF record on Namecheap

Configure an SPF for Cloudflare

Enable an SPF record on OVH

Don’t see your domain provider on the list above?  ⬇️⬇️⬇️

How to set up your SPF record on other providers?

Step 1: Sign in to your domain provider

Step 2: Navigate to the page to edit your domain’s DNS records

It can sometimes be called “DNS Management”, “Name Server Management”, or “Advanced Settings”.

Step 3: Check your current setup

Check that you don’t already have an SPF setup. An SPF record looks like this:

If your domain already has an SPF record, please check with your IT and/or provider to see where the problem comes from.
Only 1 SPF should be created per domain. Deleting an existing SPF can disconnect other tools that require it.

Step 4.a (if you have 2 or more tools that require SPF):

Add an SPF record for 2 tools. It should look like this:

Copy-paste the following text and replace “[tool-domain]” by the tool’s domain url:

v=spf1 include:_spf.[tool-domain] include:_spf.[tool-domain] ~all

Step 4.b (if you have 1 tool that require SPF):

Add an SPF record for 1 tools. It should look like this:

Copy-paste the following text:

v=spf1 include:_spf.[email-provider].com ~all

Step 5: Check that your new setup works

You can test your technical setup here. Also make sure to use a warm-up and deliverability booster like lemwarm to monitor your deliverability. It will also alert you in case of any deliverability issues.

Configuring the Rest of Your Technical Setup

Setting up your SPF is a good step toward enhanced security and avoiding the spam folder.

But just SPF is not enough.

You have other components to take care of, like your DKIM, DMARC, and MX records.

We recommend you start with MX (if not done already) and DKIM, and set up your DMARC afterward.

Remember to also set up a custom tracking domain so that you don't have to use your ESP's tracking domain, which is used by thousands of customers, including spammers.

The last step to take before starting your email outreach 🚶‍♂️

When you have everything in place, it’s time to warm your email up.

New emails or sending domains don’t have a good enough sender reputation to send hundreds of emails; they’re still cold!

You’re already going to do cold email outreach. Make sure it’s not double-cold email outreach! 😁 Warm your email up first.

lemwarm is an email warm-up service that can help you get open rates of 65% or more.

The best part is that once everything is configured, it works behind the scenes to boost your deliverability hands-off.

It takes 3 minutes to avoid spam forever

Discover how to apply these tips on lemwarm and avoid spam forever.