Free SPF Record Generator

Create SPF record easily with our free generator tool

Generate custom SPF records for your domain to prevent email spoofing and improve deliverability. Simply configure your email sources and get a ready-to-use SPF record.

Include Domains

Third-party domains that send email for you (e.g., Google Workspace, MailChimp, SendGrid)

IPv4 Addresses

Specific IPv4 addresses or CIDR ranges authorized to send email for your domain

IPv6 Addresses

Specific IPv6 addresses or ranges authorized to send email for your domain

Allow your domain's A record IP addresses to send email

Allow your domain's MX record IP addresses to send email

Redirect Domain (Optional)

Redirect SPF processing to another domain (alternative to includes - use one or the other)

All Policy

How to handle emails from sources not explicitly authorized in your SPF record

What is SPF?

Sender Policy Framework (SPF) is an email authentication method that helps prevent email spoofing and improves deliverability.

Email Authentication

SPF validates that emails are sent from authorized IP addresses and domains for your domain

Prevent Spoofing

Protects your domain from being used in phishing attacks and unauthorized email campaigns

Improve Deliverability

Properly configured SPF records help your legitimate emails reach the inbox instead of spam

How Our SPF Generator Works

Our SPF generator creates optimized records based on your email infrastructure and security requirements.
Step 1

Configure Email Sources

Add all services and IP addresses that send email for your domain, including third-party providers like Google Workspace, MailChimp, or SendGrid.

Step 2

Set Security Policy

Choose how strictly to handle unauthorized emails. Start with soft fail (~all) for testing, then move to hard fail (-all) for maximum security.

Step 3

Generate Record

Our tool creates an optimized SPF record with proper syntax, DNS lookup optimization, and best practices built-in.

Step 4

Publish to DNS

Copy the generated SPF record and add it as a TXT record in your domain's DNS settings. Changes typically take 15-30 minutes to propagate.

Why Use Our SPF Generator?

Our SPF generator follows best practices and creates optimized records for maximum security and deliverability.

DNS Lookup Optimization

Automatically optimizes your SPF record to stay within the 10 DNS lookup limit

Syntax Validation

Ensures proper SPF syntax and prevents common configuration errors

Best Practices

Follows industry standards and security recommendations for SPF implementation

Easy to Use

Simple interface that doesn't require technical expertise to create proper SPF records

Instant Results

Generate your SPF record immediately without waiting or complex setup processes

Free Forever

No cost, no registration required - just generate your SPF record and go

Multiple Sources

Support for includes, IP addresses, A/MX records, and redirect mechanisms

Copy & Paste Ready

Generated records are ready to paste directly into your DNS provider

Common SPF Configuration Scenarios

Examples of typical SPF setups for different email infrastructure configurations.

Google Workspace Only

For domains using only Google Workspace for email

Example SPF Record:

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

Setup Steps:

  • Add '_spf.google.com' to includes
  • Set policy to soft fail (~all)
  • No IP addresses or other mechanisms needed

Office 365 Only

For domains using only Microsoft Office 365 for email

Example SPF Record:

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

Setup Steps:

  • Add 'spf.protection.outlook.com' to includes
  • Set policy to soft fail (~all)
  • No additional configuration required

Web Server + Marketing Platform

For domains with web server email and marketing tools

Example SPF Record:

v=spf1 ip4:192.168.1.1 include:servers.mcsv.net ~all

Setup Steps:

  • Add your web server IP to IPv4 addresses
  • Add marketing platform include (e.g., MailChimp)
  • Set appropriate policy based on testing

Multiple Email Services

For domains using multiple email providers and services

Example SPF Record:

v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.1 ~all

Setup Steps:

  • Add all service provider includes
  • Add any dedicated server IP addresses
  • Monitor DNS lookup count (max 10)
  • Test thoroughly before using hard fail

SPF Mechanisms Quick Reference

Understanding the different SPF mechanisms and when to use them in your record.
include:
DNS Lookups:1

include:

Includes another domain's SPF record in your policy

When to use:

For third-party email services like Google Workspace, MailChimp, SendGrid

Example:

include:_spf.google.com
ip4:
DNS Lookups:0

ip4:

Authorizes specific IPv4 addresses or CIDR ranges

When to use:

For your own mail servers with known IP addresses

Example:

ip4:192.168.1.1 or ip4:192.168.1.0/24
ip6:
DNS Lookups:0

ip6:

Authorizes specific IPv6 addresses or ranges

When to use:

For IPv6-enabled mail servers

Example:

ip6:2001:db8::1
a
DNS Lookups:1

a

Authorizes the domain's A record IP addresses

When to use:

When your mail server shares the same IP as your website

Example:

a or a:mail.example.com
mx
DNS Lookups:1

mx

Authorizes the domain's MX record IP addresses

When to use:

When your MX records point to your authorized mail servers

Example:

mx or mx:example.com
redirect=
DNS Lookups:1

redirect=

Redirects SPF processing to another domain

When to use:

Alternative to includes when you want to use another domain's complete SPF policy

Example:

redirect=_spf.example.com

SPF Generator Troubleshooting Tips

Common issues and solutions when creating SPF records with our generator.

Too Many DNS Lookups

SPF has a 10 DNS lookup limit that can be exceeded with many includes

Solution:

Replace include mechanisms with specific IP addresses where possible, or use redirect instead of multiple includes

Conflicting Mechanisms

Using both redirect and include/all mechanisms in the same record

Solution:

Use either redirect OR include mechanisms with an all qualifier, not both

Missing Email Sources

Forgetting to include all services that send email for your domain

Solution:

Audit all email sources including contact forms, CRM systems, marketing platforms, and transactional email services

Overly Permissive Policy

Using +all which provides no protection against spoofing

Solution:

Start with ~all for testing, then move to -all for production after verifying all legitimate sources work

SPF Implementation Guide

Step-by-step instructions for implementing your generated SPF record.
1

Generate Your SPF Record

Use our generator to create a customized SPF record based on your email infrastructure

  • Add all email service providers (Google, Office 365, etc.)
  • Include specific IP addresses for your mail servers
  • Choose appropriate policy (start with ~all for testing)
  • Verify the record doesn't exceed 10 DNS lookups
2

Access Your DNS Settings

Log into your domain registrar or DNS provider's control panel

  • Common providers: GoDaddy, Namecheap, Cloudflare, Route 53
  • Look for DNS management, DNS records, or Zone file editor
  • You'll need to create a new TXT record
3

Create the TXT Record

Add your SPF record as a TXT record in your DNS

  • Set the record name to '@' (root domain) or leave blank
  • Set the record type to TXT
  • Paste your generated SPF record as the value
  • Set TTL to 3600 (1 hour) or use default
4

Wait for DNS Propagation

Allow time for your DNS changes to propagate globally

  • Changes typically take 15-30 minutes
  • Full global propagation can take up to 48 hours
  • Use DNS lookup tools to check propagation status
5

Test Your SPF Record

Verify your SPF record is working correctly

  • Use our SPF checker tool to validate the record
  • Send test emails to Gmail, Yahoo, and other providers
  • Check email headers for SPF authentication results
  • Monitor for any delivery issues
6

Monitor and Maintain

Keep your SPF record updated as your email infrastructure changes

  • Review quarterly or when adding new email services
  • Monitor email delivery and authentication reports
  • Update the record when changing email providers
  • Consider moving from ~all to -all after successful testing

SPF Generator FAQ

Common questions about generating and implementing SPF records.

Try Email Validation API for free!

Get started with our email validation API and experience the power of AI-powered email validation.

No credit card required
100 credits free