Free tools / Set up a domain

SPF record generator

Tick the services that send email for your domain, add your own servers, and copy one correct SPF record with where to put it in DNS.

Services that send email for your domain
Your own servers

One per line, such as 203.0.113.10 or 2001:db8::/32.

One domain per line, from your provider's setup instructions.

Publishing the record

Add the record as a TXT record at the root of the domain (the name is @ or left empty at most DNS hosts). A domain may have only one SPF record: if you already have one, replace it with the new one instead of adding a second.

Staying under 10 lookups

Every include costs at least one DNS lookup, and the services' own records add more. After publishing, run the SPF checker to see the real count. If it is over 10, remove services you no longer use or send some mail from a subdomain with its own SPF record.

~all or -all

~all (soft fail) asks receivers to accept but mark mail from unlisted servers; -all (fail) asks them to refuse it. With DMARC in place, either works; ~all is the safer start.