SPF Record Generator & Syntax Builder
Build valid, standard-compliant Sender Policy Framework (SPF) DNS TXT records. Authorize IPv4/IPv6 subnets, MX servers, and third-party email providers while avoiding the 10-lookup PermError limit.
SPF Record Generator
Create a Sender Policy Framework (SPF) DNS record to authorize IP addresses and mail servers allowed to send email on behalf of your domain.
Generated SPF Record
Tag Explanations
Understanding Sender Policy Framework (RFC 7208)
Sender Policy Framework (SPF) is an email authentication protocol defined in RFC 7208 that allows domain owners to publish a list of IP addresses, subnets, and hostnames authorized to send email on behalf of their domain in DNS TXT records.
Key SPF Mechanisms & Strictness Enforcements
v=spf1: Mandatory prefix identifying the TXT record as SPF version 1.ip4:/ip6:: Authorizes specific static IP addresses or CIDR subnets directly without performing DNS queries.include:: Delegates authorization to third-party mail providers like Google Workspace (_spf.google.com) or Microsoft 365 (spf.protection.outlook.com).-all(Fail): Instructs receivers to hard-reject unauthorized messages (recommended for mature production domains).~all(SoftFail): Instructs receivers to accept unauthorized messages but flag them as suspicious or direct to spam (recommended during migration).
The 10 DNS Lookup Limit
RFC 7208 section 4.6.4 limits the number of DNS queries performed during SPF evaluation to 10 lookups. Exceeding this limit results in a permanent evaluation error (PermError), causing receivers to ignore the SPF record. Use our SPF Flattening Tool if your provider includes exceed 10 lookups.