Free tool

SPF record generator

Build one valid SPF record that lists every service allowed to send email for your domain. Tick your providers, add your own servers and copy the TXT record, with a count of DNS lookups.

  • Common providers built in
  • Lookup counter
  • One combined record
Services that send email for you
Your own servers
Type
TXT
Host / name
@ (your root domain)

    Include values change from time to time. Check each provider's current setup instructions before you publish.

    Free, with no sign-up. The tool runs entirely in your browser: nothing you enter is uploaded or stored on our servers.

    How to use it

    How it works

    1. 01

      Tick your email services

      Mailbox provider, newsletter tool, help desk and store.

    2. 02

      Add your servers

      Website server, mail servers or IP addresses if they send mail.

    3. 03

      Publish one record

      Add or replace the TXT record on your root domain.

    What SPF does

    SPF (Sender Policy Framework) is a TXT record that lists the servers allowed to send email for your domain. Receiving servers check the domain used in the message's return path against this list. Together with DKIM and DMARC, it helps your email reach inboxes and makes spoofing harder.

    Rules every SPF record must follow

    • One record per domain. Two SPF records cause both to fail. Combine everything into one, which is what this tool produces.
    • Ten DNS lookups at most. Each include, a and mx counts as a lookup, and includes can contain more lookups of their own. Exceeding ten makes SPF fail.
    • It ends with an all rule that says what to do with mail from servers not listed.

    ~all or -all?

    ~all (soft fail) asks receivers to accept but mark mail from unlisted servers, while -all (fail) tells them to reject it. Start with ~all while you confirm every sending service is listed, then decide with your DMARC reports in hand. With DMARC at enforcement, receivers follow your DMARC policy for failing mail either way.

    SPF alone is not enough

    SPF checks the hidden return-path domain, not the From address people see, and it breaks when mail is forwarded. DKIM signatures survive forwarding, and DMARC ties both to your visible domain. Set up all three.

    Publishing the record

    In your DNS provider, find the existing TXT record starting with v=spf1 on your root domain. Replace its value with the new record, or create one if none exists. Check each provider's documentation too: some newsletter and CRM tools use their own return-path domain and need DKIM rather than an SPF include.

    Questions, answered

    No. A domain must have exactly one SPF record. Merge all services into a single record.

    SPF returns a permanent error and stops protecting your mail. Remove services you no longer use, or ask your provider about flattening options.

    Yes, publish v=spf1 -all on domains that never send mail, so nobody can use them for spoofing.

    By the Stegnor team · Updated