Skip to main content

How to Set Up SPF

Learn how to set up SPF to authenticate emails, prevent spoofing, and improve deliverability for various email providers

Neal Shulman avatar
Written by Neal Shulman
Updated over 8 months ago

Setting Up SPF (Sender Policy Framework) for Email Providers

What is SPF?

SPF, or Sender Policy Framework, is a way to protect your email domain from being used by spammers or attackers. It works by specifying which mail servers are allowed to send emails on behalf of your domain. Think of it as a "guest list" for email servers: only the servers you trust can send emails from your domain.


Why Do This?

  1. Stop Fake Emails: Keep spammers from pretending to send emails from you.

  2. Get Your Emails Delivered: Avoid emails getting stuck in spam folders.

  3. Show You’re Safe: Build trust with people who receive your emails.


Steps to Set Up SPF

1. Log In to Where You Bought Your Domain

This is the place you got your website name (like GoDaddy or Namecheap). If you don’t remember, check your email for a receipt when you bought it.

Click the right link below to log in:

  • GoDaddy: Log in

  • Cloudflare: Log in

  • Namecheap: Log in

  • Other providers? Search “Login to [Your Provider Name]” on Google.

2. Open DNS Settings

After logging in, look for something like DNS Management or Zone Editor. This is where you’ll make changes to your domain’s settings.

3. Add a New TXT Record

Here’s what to do:

  • Name/Host: Enter @ (or leave it blank—depends on your provider).

  • Value: Copy this:

    v=spf1 include:spf.google.com ~all

    Replace spf.google.com with the setting from your email provider. Look below for examples.

4. Save Your Changes

Once you’re done, click Save or Update. The changes might take a few hours to work (or up to 24 hours).


What’s the Right SPF Setting for Your Email?

Gmail (Google Workspace)

Copy this:

v=spf1 include:_spf.google.com ~all

Microsoft (Outlook/Office 365)

Copy this:

v=spf1 include:spf.protection.outlook.com ~all

Zoho Mail

Copy this:

v=spf1 include:zoho.com ~all

SendGrid

Copy this:

v=spf1 include:sendgrid.net ~all

Amazon SES

Copy this:

v=spf1 include:amazonses.com ~all

Quick Check to See If It Works

  1. Go to a free SPF checking website like MXToolBox.

  2. Enter your domain name and click Check SPF Record.

  3. Make sure the result shows your SPF is valid!


Done!

You’ve just set up SPF to keep your emails safe and trustworthy. If you ever add a new email service, remember to update your SPF settings.

Did this answer your question?