SPF record generator

Make one SPF record for every service that sends as your domain, with the lookup count.

FreeNo sign-upNothing you type leaves your browser

Services that send email as your domain
From your platform's setup guide, where it says include:… Separate several with commas.
Everything else
Mail from anywhere else is marked suspicious. The safe start.
Your SPF record2of 10 lookups, at least2 sending services listed
TypeTXT
Host or name@

@ means the domain itself. Some DNS hosts want the name left blank instead.

Valuev=spf1 include:_spf.google.com include:sendgrid.net ~all
  • Note

    At least 2 of the 10 lookups SPF allows. Each include can use more of its own: once published, check the real count with the SPF checker.

  • Note

    ~all (soft fail) is the safe start. Once DMARC reports show every service passing, -all is stricter.

  • Note

    Publish one SPF record per domain. If one already exists, merge these into it rather than adding a second: two SPF records make both invalid.

Once it's published, check it

How it works

By , Okaytosend team · Updated

Tick the services that send email as your domain, add any of your own servers, and copy one SPF record with all of them in it. The lookup counter warns before you pass SPF's limit of 10, and the notes cover the mistakes that make a record invalid. Nothing you type leaves your browser.

One record, every sender

A domain can have only one SPF record. When you add a new email service, merge its include into the existing record rather than adding a second; with two, receivers treat SPF as broken for both.

The 10-lookup limit

Each include, a and mx in the record costs a DNS lookup when a receiver checks it, and includes can contain more includes. Past 10, the record fails. Remove services you no longer use, and once the record is published, check the real count with the SPF, DKIM and DMARC checker.

~all or -all?

  • ~all (soft fail) marks mail from anywhere else as suspicious. Start here.
  • -all (fail) says mail from anywhere else is not from you. Use it once DMARC reports show every service passing.
  • Never +all. It authorises the whole internet to send as you.

Questions

How do I create an SPF record?

Tick the services that send email as your domain above, add your own servers' IP addresses if you have any, and copy the record. Add it as a TXT record on the domain itself (often written @) at your DNS host.

What is the SPF record for Google Workspace?

v=spf1 include:_spf.google.com ~all, with any other services added before the ~all.

What is the SPF record for Microsoft 365?

v=spf1 include:spf.protection.outlook.com ~all, with any other services added before the ~all.

Can I have two SPF records?

No. Two SPF records on the same domain make SPF fail for both. Merge them into one.

Is what I type sent anywhere?

No. The record is built in your browser. Nothing is sent or stored.

More free tools

Cookie settings