Free Generator

SPF Record Generator

Generate a valid SPF record for your domain. Includes lookup counting, validation, and copy-ready DNS records.

Add domains to include (e.g., _spf.google.com)

Add specific IPv4 addresses or CIDR ranges

Add specific IPv6 addresses or ranges

Understanding SPF Records

What is SPF?

SPF (Sender Policy Framework) is a DNS record that specifies which mail servers are authorized to send email for your domain. It helps prevent email spoofing.

10 Lookup Limit

SPF has a limit of 10 DNS lookups. Each "include", "a", "mx", "ptr", and "exists" mechanism counts as a lookup. Exceeding this causes SPF to fail.

Best Practices

Use ~all (soft fail) when starting out. Only include necessary services. Keep your SPF record under 255 characters, or split it using "include".

Pro Tip: SPF alone isn't enough. Combine it with DKIM and DMARC for complete email authentication. Use our DMARC Generator to create your DMARC record next.

Related Tools