SPF record generator for cold email domains

Tick the services that send as your domain, add any servers or IPs, and get one SPF TXT record ready to paste into your DNS. It counts DNS lookups against the limit of 10 and flags anything that would make SPF fail.

DNS settings · example.comSPF record · updates as you type
The domain in your From address
Who sends email for this domain? Tick every service that sends as this domain: your inbox, sequencer, newsletter and help desk.
Some tools (HubSpot, for example) give each account its own include value, and some send from their own bounce domain so SPF isn't needed here. Copy whatever your provider's setup screen shows into the box below.
One per line: include:, ip4:, ip6:, a, mx, or just an IP address or domain
Mail from servers not on this list

TXT record to publishReplace any existing v=spf1 record
TXT @example.com v=spf1 ip4:203.0.113.5 include:_spf.google.com include:sendgrid.net ~all

Host @ means the domain itself. Some DNS panels want the full name or leave the host blank instead.

DNS lookups2 / 10Within limit
Mechanisms3plus the all rule
Length72characters
    Sample record. Tick your own senders.
    • One valid record
    • 10-lookup counter
    • IP and CIDR checks
    • Merges duplicate records

    Add this tool to your site

    Paste this code into any page. It stays free and updates automatically.

    How it works

    From a list of tools
    to one TXT record.

    1. 01

      Enter your domain

      The domain people see in your From address. Already have a record? Import it and the generator loads it for you.

    2. 02

      Tick your senders

      Your inbox provider, sequencer, newsletter tool and help desk. Add anything else as include:, ip4:, ip6:, a or mx.

    3. 03

      Choose the all rule

      ~all (soft fail) while you check everything is listed, -all (hard fail) once you're sure.

    4. 04

      Copy and publish

      Paste the value into a TXT record at @ in your DNS panel, replacing any old v=spf1 record.

    SPF mechanisms

    MechanismWhat it does
    include:_spf.google.comAuthorises the servers listed in another domain's SPF record (1 DNS lookup)
    ip4:203.0.113.5 or ip4:203.0.113.0/24Authorises one IPv4 address or a range (no lookup)
    ip6:2001:db8::/32Authorises an IPv6 address or range (no lookup)
    a and mxAuthorises the IPs your domain's A or MX records point to (1 lookup each)
    ~allSoft fail: unlisted servers are accepted but marked suspicious
    -allHard fail: receivers are told to reject unlisted servers

    What an SPF record does

    SPF (Sender Policy Framework) is a TXT record on your domain that lists the servers allowed to send email for it. When a message arrives, the receiving server looks up the record for the domain in the envelope sender and checks whether the sending IP is on the list. If it isn't, the result is a fail or soft fail, depending on the rule at the end of your record.

    SPF on its own doesn't stop spoofing of the From address people see. It becomes useful when it passes alongside DMARC, which checks that the domain SPF approved matches the From domain. That's why mailbox providers now expect SPF, DKIM and DMARC together on any domain that sends in volume.

    How to read an SPF record

    Every record starts with v=spf1, followed by mechanisms that are checked left to right, and ends with an all rule for everything else.

    • include: points to another domain's SPF record, usually your email provider's.
    • ip4: and ip6: list addresses or ranges directly.
    • a and mx approve whatever IPs your A or MX records point to.
    • ~all, -all or ?all decide what happens to mail from servers not on the list.

    A worked example

    Say your team uses Google Workspace for the inbox, SendGrid for product emails and one office server on 203.0.113.5. Tick the two services, add ip4:203.0.113.5 and keep ~all. The generator returns:

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

    The IP comes first because it needs no DNS lookup. The two includes use 2 of your 10 lookups. Publish it as a TXT record with the host @ and a TTL of an hour, and you're done.

    The 10 DNS lookup limit

    To check SPF, receivers may perform at most 10 DNS lookups. Every include, a, mx, ptr and exists costs one, and the lookups inside each include count too, because most provider records contain includes of their own. Go over 10 and SPF returns a permanent error, which counts as a fail for every message.

    The counter above shows the lookups in your own record. If you're at 7 or more, check the published record with an SPF checker that follows includes. To get back under the limit:

    1. Remove tools you no longer send from. Old trials are the usual culprit.
    2. Move bulk sending to a subdomain such as mail.example.com, with its own SPF record.
    3. Replace an include with the provider's ip4/ip6 ranges only if they publish fixed ones, and review them regularly.

    Common SPF mistakes

    • Two SPF records. A domain can only have one TXT record that starts with v=spf1. Two or more make SPF fail. Use Import to merge them.
    • Using +all. It authorises every server on the internet to send as you. Never publish it.
    • Forgetting a tool. Your CRM, billing system or help desk may send as your domain. Check what each one says in its domain settings.
    • Private IPs. Addresses like 10.0.0.5 or 192.168.1.20 are never seen by receivers, so listing them does nothing.
    • Jumping straight to -all. Start with ~all, watch your DMARC reports, then tighten.

    Choosing ~all or -all, and going live

    Both protect you once DMARC is in place, because DMARC decides what happens to failing mail. ~all is the safer default while you confirm every sender is listed. Move to -all when your DMARC reports show nothing legitimate failing. ?all (neutral) says nothing about unlisted servers, so treat it as a testing option only.

    DNS changes usually show up within minutes, though they can take longer if your old record had a long TTL. Send a test email to an inbox you control and check the headers for spf=pass. Then turn on DKIM signing in each sending tool and publish a DMARC record.

    Create your policy with the DMARC Generator, check your copy with the Spam Words Checker, and model a campaign with the Cold Email ROI Calculator. Want domains, warm-up and deliverability handled for you? See our cold email service.

    FAQ

    Questions,
    answered.

    A TXT record in your domain's DNS that lists the servers allowed to send email for that domain. Receiving servers check it to decide whether a message really came from you. It always starts with v=spf1 and ends with an all rule.

    Without one, receivers can't tell your real email from someone spoofing your domain, and mail is more likely to land in spam. Large mailbox providers expect SPF, DKIM and DMARC on any domain that sends in volume, which includes cold email.

    -all (hard fail) tells receivers to reject mail from servers not in your record. ~all (soft fail) says accept it but treat it as suspicious. ?all (neutral) says nothing either way. Most domains start with ~all and move to -all once DMARC reports show every sender is covered.

    In the DNS settings wherever your domain is managed, usually your registrar or DNS host. Add a TXT record with the host @ (the root domain) and paste the generated value. If a v=spf1 record already exists, edit it instead.

    No. A domain can have only one TXT record starting with v=spf1. With two or more, SPF returns a permanent error and fails. Paste all of them into Import and the generator merges them into one record.

    Receivers will perform at most 10 DNS lookups to check your record. Each include, a, mx, ptr and exists costs one, plus any lookups inside included records. Go over 10 and SPF fails, so remove unused senders or move bulk mail to a subdomain.

    Import your current record, tick the new service or add its include in Other senders, then copy the result and replace the old record. Don't add a second v=spf1 record.

    Not on its own. SPF checks the hidden envelope sender, not the From address people see. Add DKIM signing and a DMARC policy so receivers can match both to your visible domain and act on failures.

    No. It's free, with no sign-up or credit card, and the record is built in your browser. Your settings are only saved on your own device.

    Done-for-you

    A valid SPF record is step one. Inbox placement is the goal.

    We set up sending domains, SPF, DKIM, DMARC and warm-up, then run cold email campaigns that land in the inbox and book meetings.