SPF Record Generator

Sender Policy Framework (SPF) records tell receiving mail servers which IP addresses and domains are authorized to send email on behalf of your domain. Use this builder to generate a valid v=spf1 TXT record.

Build Your Record

A Records
Allow any IP address the domain's A record points to.
MX Records
Allow any IP address the domain's MX records point to.
IPv4 Addresses
Specific IPv4 addresses or CIDR blocks allowed to send mail. Separated by commas.
IPv6 Addresses
Specific IPv6 addresses or CIDR blocks allowed to send mail.
Includes
Third-party domains authorized to send mail (e.g., Google Workspace, Microsoft 365).
Handling All Other Mail
The all mechanism defines what to do with mail from sources not listed above.

Generated Record

Add this as a **TXT record** in your DNS settings for your root domain (or @).

v=spf1 ~all

SPF FAQ

What is v=spf1?

This is the version tag. It must be at the very beginning of the TXT record. Currently, only v=spf1 is valid and used.

Qualifiers (+, -, ~, ?)

The 10 DNS Lookup Limit

The SPF specification limits the number of DNS lookups to 10 to prevent Denial of Service attacks. include, a, mx, ptr, and exists mechanisms all count toward this limit. ip4 and ip6 do not.