Generate a Valid SPF Record

Build a SPF TXT record for your domain — choose trusted email providers, add IPs, and generate a DNS-ready record that meets the 10-lookup rule.

🚀 Step 1: Enter Your Domain Name

Use your actual sending domain (e.g. yourdomain.com).

✅ Step 2: Build & Copy Your SPF TXT

Select the mail services you use, and MailTested will generate a complete SPF record you can paste into your DNS zone.

Powered by iServerSupport • MailTested SPF Generator

MailTested helps you verify SPF, DKIM, and DMARC records for higher inbox success.

📘 SPF Generator — Frequently Asked Questions

An SPF record is a DNS TXT entry that lists which IPs and mail servers can send email for your domain. It helps prevent forgery and spoofing.
-all blocks unauthorized senders completely. ~all allows soft fails during testing. ?all offers no enforcement and is rarely used.
Avoid stacking too many includes. Replace legacy ESPs, consolidate IPs, and rely on MailTested’s count validator to ensure your SPF stays valid.
Google Workspace: v=spf1 include:_spf.google.com -all • Microsoft 365: v=spf1 include:spf.protection.outlook.com -all • cPanel mail server: v=spf1 +a +mx +ip4:192.0.2.0/24 -all

📨 Publish Your SPF Record the Right Way

After generating your SPF record, add it as a TXT record in your domain’s DNS settings. You should only have one SPF record per domain — multiple entries cause instant SPF failure.

Use the SPF Checker to validate your new record once published. Combine it with DKIM and DMARC alignment to build domain trust and protect against spoofing.

Learn more from the official SPF RFC 7208 specification.

🧩 Why Use MailTested’s SPF Generator

Unlike generic SPF tools, MailTested actively analyzes DNS responses, expansion depth, and include trees. It highlights redundant mechanisms, calculates lookup totals, and provides real optimization suggestions — all before you hit “Save” in DNS.

This ensures your SPF record is not just syntactically correct but technically efficient, passing every SPF validation test used by Gmail, Outlook, and Yahoo Mail.

📄 Common SPF Record Examples

For Google Workspace: v=spf1 include:_spf.google.com -all

For Microsoft 365: v=spf1 include:spf.protection.outlook.com -all

For Mailgun + Custom IP: v=spf1 include:mailgun.org ip4:192.168.1.1 -all

Each one defines who may send on your behalf, keeping unauthorized servers out of your message path. The MailTested SPF Generator helps you create, optimize, and test these configurations automatically.