How to Set Up SPF to Prevent Email Spoofing and Ensure Message Delivery

Setting up SPF (Sender Policy Framework) helps prevent others from sending unauthorized emails using your domain. It also improves the chances that your emails land in your recipientsโ€™ inboxes instead of their spam folders.

Why This Matters

๐Ÿ“Œ SPF protects your domain from being used in spam or phishing emails.
๐Ÿ“Œ It also improves email deliverability by authenticating who can send mail from your domain.

Before You Start

โœ… Make sure you have access to your domain registrar or DNS hosting provider.
โœ… Know whether youโ€™re sending mail only via Google Workspace, or also through third-party email services.

Step-by-Step: How to Set Up SPF

Step 1: Create Your SPF TXT Record

  • A TXT record defines the mail servers allowed to send emails from your domain.

  • Each domain can only have one SPF TXT record, but it can list multiple mail servers.

Step 2: Choose the Right SPF Record Format

๐ŸŸข If you send all email through Google Workspace only:

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

 

๐ŸŸ  If you also use other senders (e.g., Mailchimp, CRM tools):

  • Create a custom SPF record including all sender domains.

  • Example:
    v=spf1 include:_spf.google.com include:mail.zendesk.com ~all

 

Step 3: Log in to Your Domain Provider

  1. Sign into your domain hostโ€™s management console.

  2. Locate the section to manage DNS or TXT records.

  3. Add or update the SPF TXT record with the correct value.

Step 4: Save and Apply Changes

โœ… Your SPF record is now live.
Changes may take a few minutes to a few hours to propagate.

Updating SPF for New Mail Servers

๐Ÿ“Œ Any time you start using a new email service, update your SPF TXT record to include the new sender.
๐Ÿ“Œ Failing to update can cause delivery issues or unauthorized senders spoofing your domain.

Resources

๐ŸŽฅ Watch the SPF Setup Tutorial on YouTube
๐Ÿ“– Google Workspace SPF Setup Guide
๐Ÿ“– Find Your Domain Host Instructions

Final Tips

โœ… Use only one SPF TXT record per domain.
โœ… Test your setup with tools like MXToolbox SPF Lookup.
โœ… Keep your record updated when you change or add email providers.