Authorize your email senders

Free Tool

SPF Record Generator

Create your SPF record in minutes

Build a valid SPF TXT record to authorize your email senders and improve deliverability. Our free SPF generator creates valid DNS records with real-time validation.

No signup required. Real-time validation.

1

Select Your Email Providers

Start with providers that clearly require root-domain SPF includes. Many other providers are setup-dependent: default modes often rely on DKIM, while custom Return-Path/MAIL FROM modes may require SPF on a sender subdomain.

Common Root-Domain SPF Includes

These providers commonly require SPF includes on your main domain record.

Advanced: Add Custom Includes

Use this only when provider documentation explicitly requires an SPF include for your chosen setup (for example custom Return-Path or custom MAIL FROM).

Comma-separated. Includes count toward the 10 DNS lookup limit and may belong on a sender subdomain.

Setup-Dependent Providers

Default setups often use provider-owned Return-Path domains and DKIM. If you enable custom Return-Path or MAIL FROM, SPF may be required (often on a subdomain).

Transactional Email

Amazon SES

Default MAIL FROM uses amazonses.com; custom MAIL FROM needs SPF on that subdomain

SendGrid

Automatic CNAME mode usually handles SPF; custom return-path/manual mode may need SPF

Mailgun

SPF usually needed on your sending domain/subdomain

Postmark

Default provider Return-Path; custom Return-Path supports SPF alignment

Mandrill

DKIM-first setup; some domain modes still require SPF include

Marketing, Sales & Support

Mailchimp

Usually DKIM-based; check docs when custom bounce domain is enabled

Brevo

Usually DKIM-based; SPF needs depend on plan and sending mode

HubSpot

Email sending domain setup can include SPF requirements

Salesforce

SPF on SAP subdomain only

Zendesk

Can require SPF include when sending on behalf of your domain

Freshdesk

SPF may be needed depending on mailbox/authentication setup

Intercom

Usually provider SPF; custom return-path option can affect SPF alignment

2

Add Custom IP Addresses (Optional)

Comma-separated. Supports CIDR notation (e.g., 192.0.2.0/24).

Comma-separated. Supports CIDR notation (e.g., 2001:db8::/32).

3

Choose Your SPF Policy

Generated SPF Record

TXT
TXT Record: @
v=spf1 ~all
DNS Lookups 0/10

How to Deploy

  1. 1 Login to your DNS provider (GoDaddy, Cloudflare, Namecheap, etc).
  2. 2 Create a TXT record.
  3. 3 Host: @ or leave empty
  4. 4 Value: Paste the record above.

What is an SPF Record?

SPF (Sender Policy Framework) is an email authentication protocol that specifies which mail servers are authorized to send email on behalf of your domain. It works by publishing a DNS TXT record that lists approved sending sources.

When a receiving mail server gets an email, it checks the SPF record of the sender's domain. If the sending server's IP address matches the SPF record, the email passes SPF authentication. This helps prevent email spoofing and improves deliverability.

How SPF Authentication Works

SPF authentication happens during the email delivery process. Here's a step-by-step breakdown:

1

Email is Sent

When your server sends an email, it connects to the recipient's mail server and identifies itself with an IP address.

2

SPF Lookup

The receiving server extracts the domain from the Return-Path (envelope sender) and queries DNS for the SPF record.

3

IP Verification

The receiver checks if the sending server's IP address is listed in the SPF record's authorized sources.

4

Result Evaluation

Based on the match and your policy (~all, -all), the server assigns a result: pass, fail, softfail, or neutral.

5

Delivery Decision

The SPF result is factored into the spam filtering decision, along with DKIM and DMARC results.

Why Your Domain Needs SPF

SPF is a foundational email authentication protocol. Here's why it's essential for your domain:

Prevent Email Spoofing

SPF declares which servers can send email for you. Without it, spammers can easily forge your email address and damage your reputation.

Improve Email Deliverability

Major providers like Gmail, Microsoft, and Yahoo check SPF. Emails from domains without SPF are more likely to be flagged as spam.

Meet Sender Requirements

Since February 2024, Google and Yahoo require SPF for bulk email senders. Without it, your marketing emails may be rejected.

Support DMARC Alignment

SPF is one of two authentication methods (alongside DKIM) that DMARC uses to verify email legitimacy. For full protection, you need both.

Protect Your Brand

When criminals spoof your domain, recipients blame your brand for the spam or phishing. SPF helps prevent this reputation damage.

Gain Visibility

With SPF in place and DMARC reporting enabled, you can see exactly who is sending email using your domain.

Common SPF Mistakes to Avoid

SPF is straightforward, but these common mistakes can cause authentication failures or delivery problems:

Exceeding 10 DNS Lookups

Each include, a, mx, ptr, exists, and redirect counts toward a 10-lookup limit. Exceeding it causes SPF to fail with PermError. Use ip4/ip6 instead of includes when possible.

Publishing Multiple SPF Records

Your domain should have exactly one SPF TXT record. Multiple records cause SPF to fail. Combine all mechanisms into a single record.

Adding Unnecessary Includes

Many providers default to their own Return-Path, so adding includes without checking docs wastes lookups. If custom Return-Path or MAIL FROM is enabled, SPF may still be required on that sender domain.

Using -all Too Early

The -all (hard fail) policy can cause legitimate email to be rejected if you haven't authorized all your sending sources. Start with ~all and DMARC monitoring.

Forgetting Your Own Server

If you have a web server that sends email (contact forms, notifications), make sure its IP address is included in your SPF record.

How to Create an SPF Record for Your Domain

Creating an SPF record is straightforward with our free SPF generator. Select providers that require root-domain SPF includes, add any custom IP addresses for your own mail servers, optionally add provider-specific includes from official docs, and choose your policy. The tool automatically builds a valid SPF record that you can copy and paste into your DNS settings.

Important: For many transactional and marketing providers, root-domain SPF includes are optional in default setups because they use provider-owned Return-Path domains and rely on DKIM for DMARC alignment. If you enable custom Return-Path or custom MAIL FROM, SPF may be required on the sending subdomain.

Frequently Asked Questions

What is an SPF record and why do I need one for email?

An SPF record (Sender Policy Framework) is a DNS TXT record that specifies which mail servers are authorized to send email on behalf of your domain. Without SPF, your emails may be marked as spam or rejected by providers like Gmail and Outlook. Since February 2024, Google and Yahoo require SPF for bulk senders.

How do I generate an SPF record for my domain?

Use our free SPF generator above. Enter your domain, select your email providers (like Google Workspace or Microsoft 365), add any custom IP addresses, choose your policy, and click copy. The tool will generate your SPF record automatically with proper syntax.

Can I create an SPF record for free?

Yes! This SPF record builder is completely free with no signup required. You can create an SPF record in minutes and deploy it to your DNS provider immediately.

Where do I add my DNS SPF record?

Add your DNS SPF record as a TXT record at your domain's root (@ or empty host). Log into your DNS provider (GoDaddy, Cloudflare, Namecheap, Route53, etc.), create a new TXT record, and paste the generated value.

What is the SPF 10 DNS lookup limit?

SPF records are limited to 10 DNS lookups. Each include, a, mx, ptr, exists, and redirect counts toward this limit. Exceeding it causes SPF to fail with a PermError. Our generator shows a real-time counter to help you stay within the limit.

What's the difference between ~all and -all in SPF?

~all (SoftFail): Tells receivers to accept but mark emails that fail SPF. Recommended when using DMARC, as DMARC provides the final policy decision.

-all (Fail): Tells receivers to reject emails that fail SPF. Strictest policy, but may cause issues with email forwarding.

?all (Neutral): No policy assertion. SPF result has no effect on delivery. Rarely used.

Do I need technical knowledge to use this SPF wizard?

No! Our SPF wizard guides you through the process step-by-step. Just select your email providers from the presets, and we handle the syntax. Copy the result and paste it into your DNS settings.

Why don't some providers need an SPF include?

SPF checks the Return-Path (envelope-from) domain, not the visible "From" address. Many modern email providers use their own domain in the Return-Path (e.g., mcsv.net for Mailchimp), so SPF checks happen against their servers, not yours.

For DMARC to pass, you need alignment. Default provider setups usually achieve this via DKIM signing with your domain, which often means no extra SPF include on your root domain.

Important: This is setup-dependent. If you enable custom Return-Path or MAIL FROM on your own domain/subdomain, SPF can be required for that sender domain.

Learn more about Return-Path and provider SPF requirements →

How do I check if my provider uses their own Return-Path?

Send a test email through the provider and inspect the email headers:

  • Gmail: Open email → Three dots menu → "Show original"
  • Outlook: Open email → File → Properties → "Internet headers"

Look for the Return-Path header. If it shows your domain or a subdomain you control (e.g., [email protected]), you likely need SPF for that sender domain. If it shows the provider's domain (e.g., [email protected]), SPF is usually handled by the provider and DKIM becomes your primary alignment path.

Where can I find official SPF documentation for each provider?

Complete your email authentication

SPF is just one part of email authentication. Combine it with DKIM and DMARC for complete protection against spoofing and phishing.