SPF Record Generator

Build a valid SPF (v=spf1) record from your senders, includes and policy.

SPF record (TXT)

Frequently asked questions

What is an SPF record?

An SPF (Sender Policy Framework) record is a TXT record in your DNS that lists which mail servers are allowed to send email for your domain. Receivers check it to help detect forged senders.

Where do I publish the record?

Publish it as a TXT record at your domain root (the same name as your domain). A domain should have exactly one SPF record.

What does -all versus ~all mean?

The all mechanism sets the default for servers not listed. -all (hard fail) says reject anything else, ~all (soft fail) says accept but mark suspicious, and ?all is neutral. -all is the strongest and recommended once you are confident the list is complete.

What is the 10-lookup limit?

SPF allows at most 10 DNS-lookup mechanisms (include, a, mx, ptr, exists, redirect) when it is evaluated. Exceeding it causes a permerror and SPF failure. This generator counts them so you can stay under the limit.

Do I list every server, or use includes?

Use include for third-party senders (your email host, marketing platform) so they can manage their own IPs, and ip4/ip6 for servers you control directly.

Is my input sent anywhere?

No. The record is assembled entirely in your browser and nothing you type is uploaded.