SPF generator

Short answer

How do I create an SPF record?

You create an SPF record by collecting all the services that send email for the domain in one TXT record that starts with v=spf1 and ends with ~all or -all. If you use Microsoft 365 and Mailchimp, it becomes v=spf1 include:spf.protection.outlook.com include:servers.mcsv.net ~all. Put the record on the domain itself and remove any old SPF records.

Choose the services that send email for the domain, and we put together the SPF record and count the lookups.

How to use the generator

  1. Choose the services that send email with the domain as the sender.
  2. Add your own servers by IP address if you have any.
  3. Choose what should happen to everyone else. ~all suits a DMARC setup.
  4. Copy the record and replace the old SPF record on the domain itself.

Do not forget the services that send in the background

Newsletters, customer service, accounting and online shops often send email with the domain as the sender. If they are missing from SPF, the email can end up in spam when DMARC is tightened.

Common mistakes

  • Two SPF records on the same domain. Then SPF fails for all email. Merge them into one.
  • More than 10 DNS lookups because too many services are added with include.
  • Services that are no longer used are still in the record and give others permission to send.
  • The record ends with +all, which approves every server in the world.

The generator counts the lookups while you choose, so you see straight away if the record gets too large.

Questions and answers

Where do I add the SPF record?

As a TXT record on the domain itself at your DNS provider. If an SPF record already exists, replace it. There must be only one.

What if my service is not in the list?

Look for SPF in the documentation of the service. It says which include or which IP addresses to add.

Should I use -all?

It is the strictest, but ~all is just as safe together with DMARC and causes fewer problems with forwarding. Use -all when you know the list is complete.

Do domains that send no email need SPF?

Yes. Add v=spf1 -all, so receivers know that nobody may send from the domain. Also set DMARC with p=reject on such domains.