Generate SPF (Sender Policy Framework) DNS records to prevent email spoofing and improve deliverability. Configure IP addresses, mail servers, and policies instantly.
Select which mechanisms to include in your SPF record
What to do when email comes from unauthorized sources
SPF (Sender Policy Framework) is an email authentication method that helps prevent sender address forgery. By publishing an SPF record in your DNS, you tell receiving mail servers which IP addresses are authorized to send email on behalf of your domain. This reduces the chance of your emails being marked as spam and protects your domain from spoofing and phishing attacks.
An SPF (Sender Policy Framework) record is a type of DNS TXT record that specifies which mail servers are authorized to send email on behalf of your domain. When a receiving mail server gets an email claiming to be from your domain, it checks your SPF record to verify the sending IP is authorized.
~all (soft fail) is recommended for most users. It tells receivers to accept emails from unauthorized sources but mark them suspicious. -all (hard fail) is stricter and tells receivers to reject unauthorized emails, but it can cause legitimate emails to be rejected if your SPF record is incomplete.
Log into your DNS provider (e.g., Cloudflare, GoDaddy, Namecheap), find the DNS management section, and add a TXT record with the host/name set to @ or your domain, and the value set to the generated SPF record. Changes may take a few minutes to propagate.
No, you should only have one SPF record per domain. If you need to authorize multiple services, combine them into a single record using multiple include mechanisms or ip4/ip6 entries. Having multiple SPF records can cause email delivery issues.
A single DNS TXT string should not exceed 255 characters. If your SPF record is longer, you can split it into multiple quoted strings (which this generator does automatically) or use include mechanisms to reference other SPF records.