Free tool

SPF record generator

Tick the services that send mail for your domain and get one SPF record to publish, with its includes resolved and its DNS lookups counted against the limit of 10 before it goes live.

With it, the record is checked against what the domain publishes today, so it replaces that record instead of becoming a second one.

Where your team's email lives
Email sending services
Support, CRM and marketing tools

The include domains and IP addresses other services give you, one per line. To add a sender to the record you have now, paste that record here and tick the new provider.

Your own mail servers
Mail from everything else

Free. No signup, nothing stored. Includes are resolved live, the way the SPF checker resolves them.

With SendHeron there is nothing to add to this record: it sends with an envelope domain of its own, and adding a sending domain gives you every record to publish. SendHeron is lifecycle email automation for SaaS. Start a free trial if you want your sending handled that way.

How to create an SPF record

An SPF record is one TXT record on the domain you send from, starting v=spf1. After that come the servers allowed to send mail for the domain: ip4 and ip6 entries name addresses directly, and include points at a provider's own list, which is how most services are authorized. The all at the end says what receivers should make of mail from anywhere else.

This generator writes the addresses first and the includes after them. Receivers evaluate the record from left to right and stop at the first match, so mail from a server listed by its address passes before a single include is fetched.

One record per domain, so add to it

A domain must publish exactly one record starting v=spf1. Adding a service means editing that record, never adding a second one: with two, RFC 7208 has receivers return a permanent error, and SPF fails for all of the domain's mail.

Enter your domain and the generator reads what it publishes today. It tells you the new record replaces the old one, lists any sender the old record allowed that the new one would drop, and flags a domain that already has two records or ends in +all, before anything is published.

The 10 lookup limit, counted before you publish

Every include, a and mx in the record costs one DNS lookup when a receiver evaluates it, and so does every include inside the records those includes point at. Past 10, receivers stop and return a permanent error, and SPF fails. Some providers' includes cost more than one, because they nest further includes of their own.

The generator resolves each include live, with the same code as the SPF checker on this site, and shows the whole tree with its count. The number you see here is the number the checker finds once the record is published. ip4 and ip6 entries cost nothing, which is why they come first.

Where a provider's include goes

SPF is checked against the envelope sender, the address that bounces return to, and not every service sends with yours. Amazon SES, for one, uses a subdomain of amazonses.com unless you set up a custom MAIL FROM domain, and then its SPF record goes on that subdomain of yours, not on your main domain. An include for such a service in your main record spends a lookup and does nothing for that service's mail.

Every provider in the list follows its own documentation. When that puts the provider's SPF somewhere other than your main domain, says no include is needed, or gives each account an include of its own, the generator leaves it out of the record and says why.

~all or -all

The ending decides what happens to mail from servers the record does not list. With ~all, a soft fail, receivers treat it with suspicion; with -all, a hard fail, it fails SPF outright. DMARC counts the two the same way. Start with ~all while you are still finding every service that sends for the domain, and move to -all once the record is complete.

The generator never writes ?all, which tells receivers the record has no opinion about anyone else, or +all, which lets every server on the internet pass SPF as you.

Worth reading next: the SPF checker, SPF, DKIM and DMARC explained from scratch

Questions

SPF record generator, in detail

Free trial

Email automation by people who obsess over this layer

SendHeron is lifecycle email for SaaS: sequences, tags, and an API, running on authentication done properly. Start a trial and put it under your own sending.

7-day free trial. Pick a plan, add a card, cancel before the trial ends and you won't be charged. 1,000 contacts and 5,000 sends during the trial.