Generator

SPF record generator

Pick the services that send as your domain and add your own servers. The SPF record generator builds the TXT record, and one click resolves every include to count the DNS lookups receivers will see.

include:_spf.google.com

include:spf.protection.outlook.com

include:amazonses.com

include:sendgrid.net

include:mailgun.org

include:spf.mtasv.net

include:spf.mandrillapp.com

include:zohomail.com

Space or comma separated, e.g. _spf.example-esp.com

TXT example.com

v=spf1 include:_spf.google.com ~all
  • 1 lookups in this record itself

    Each include, a and mx costs one, plus whatever the included records use. Count the real total below.

How to use the SPF generator

  1. Tick every service that sends mail with your domain in the envelope sender: your mailbox provider, your transactional email API, your marketing tool, your helpdesk.
  2. Add any servers of your own as ip4: or ip6: ranges.
  3. Choose how to treat everything else. ~all is the usual choice alongside DMARC.
  4. Click Count real DNS lookups. The generator resolves the draft record live, without publishing it, and shows the full include tree.
  5. Publish the record as a TXT record at the root of the domain (@ in most DNS panels), replacing any existing v=spf1 record.

Examples

Google Workspace plus a transactional provider:

v=spf1 include:_spf.google.com include:sendgrid.net ~all

A single office server and Microsoft 365:

v=spf1 ip4:203.0.113.25 include:spf.protection.outlook.com -all

A domain that never sends mail:

v=spf1 -all

Keeping under the lookup limit

  • Remove includes for services you have stopped using. They still cost lookups.
  • Use ip4:/ip6: for your own servers. They are free.
  • Send marketing or bulk mail from a subdomain (news.example.com) with its own SPF record.
  • Check the record again from time to time. Providers change their own records, and your total can grow without you editing anything.

Many services use their own envelope domain

Some email services send with their own Return-Path domain by default. Then SPF is checked against their domain, not yours, and adding their include to your record changes nothing. It only counts once you configure the provider's custom return-path or bounce domain on a subdomain of yours. That subdomain gets its own SPF record, usually a CNAME or TXT record the provider gives you.

Frequently asked questions

SPF Lookup
Parse an SPF record, follow every include and count DNS lookups against the limit of 10.
DMARC Record Generator
Pick a policy, reporting address and alignment, and copy a valid DMARC record.
DKIM Key Generator
Generate an RSA or Ed25519 DKIM key pair in your browser and get the DNS record.