SPF Record Generator

SPF Record Generator

Tell this page which services send email as your domain and it assembles the matching SPF TXT record, in the right order, with a policy you choose.

Publish the result as a TXT record on the root of your domain. One SPF record per domain, never two.

How to use

  1. Type the domain that sends your email, then tick every service that sends on its behalf.
  2. Add any IP addresses your own mail servers use, plus vendor includes that are not in the list.
  3. Choose a policy. Start with soft fail while you watch reports, then move to fail once you are confident nothing legitimate is missing.
  4. Copy the record and publish it as a TXT record at the root of the domain.

Frequently asked questions

Why can I only have one SPF record?
The specification says a domain publishing more than one SPF TXT record is a permanent error, and receivers will treat the whole check as broken. Merge everything into a single record instead.
What is the ten-lookup limit?
Each include, a, mx and redirect costs a DNS lookup, and SPF allows ten in total. This tool counts them for you and warns before you go over.
Should I use -all or ~all?
Soft fail is a safe launch setting because it does not bounce mail you forgot about. Once your reports are clean, switch to fail so spoofed mail is actually rejected.