SPFEmail authentication explained

What is an SPF record? Format, syntax and examples

An SPF record is one DNS TXT record at a domain that lists the servers allowed to send its mail. The format is v=spf1, then mechanisms such as include:, ip4: and mx separated by single spaces, usually ending in an all term: v=spf1 include:_spf.google.com ~all. Receivers compare the sending IP with that list.

How it looks in DNS

TXT
Name
@
Value
v=spf1 include:_spf.google.com include:_spf.salesforce.com ip4:203.0.113.10 ~all

Google Workspace, Salesforce and your own server: 3 of 10 DNS lookups, everything else soft-fails

Part by part

SPF record format, left to right

v=spf1, then terms separated by single spaces: mechanisms that match senders, then name=value modifiers. The record above, one term at a time.

TXT at @

v=spf1include:_spf.google.cominclude:_spf.salesforce.comip4:203.0.113.10~all

  1. v=spf1The version, always first: exactly v=spf1, in lower case. A record starting v=spf10 is discarded
  2. include:_spf.google.comGoogle's servers. 1 DNS lookup: its record holds only IP ranges
  3. include:_spf.salesforce.comSalesforce's servers. 2 DNS lookups: the include plus the exists: term inside. Skip it when Email Security Compliance is on: Salesforce then passes SPF on its own bounce domain
  4. ip4:203.0.113.10One IPv4 address, /32 without a mask; ip4 and ip6 cost no lookups
  5. ~allAnything unmatched gets softfail; receivers should not reject on that alone. -all returns fail, ?all neutral, +all passes any server

Examples

SPF record examples for common setups

One record per domain: start from the closest example and add other senders. On 26 November 2026 we followed every include below; cards show lookups out of 10 and what unlisted servers get.

Look up the SPF record of any domain

The same check as our SPF checker: the record is read live from DNS in your browser and every part is explained. Try your own domain, or a big sender to see a working record.

Try

Every include is followed to the end and counted. Lookups go from your browser to Cloudflare's public DNS resolver; nothing is stored.

What you get

The result, in plain words

  1. Every include followed, with its own lookup count
  2. Lookups against the limit of 10, void lookups against 2
  3. Each mechanism and the all ending in plain words
  4. The corrected record, ready to paste into your DNS

How it works

What a receiving server does with SPF

  1. Read the envelope sendersource (opens the vendor's page in a new tab)

    The MAIL FROM (Return-Path) domain, or the HELO name when it is empty

  2. Fetch the recordsource (opens the vendor's page in a new tab)

    Only a TXT record starting with v=spf1 counts; two of them are a permerror

  3. Walk the mechanismssource (opens the vendor's page in a new tab)

    Left to right; the first match decides. No match and no all or redirect gives neutral

  4. Return a resultsource (opens the vendor's page in a new tab)

    pass, fail, softfail, neutral, none, permerror or temperror

  5. Hand it to DMARCsource (opens the vendor's page in a new tab)

    DMARC counts an SPF pass only when the Return-Path domain aligns with From

SPF checks only the envelope domain. Mail can pass SPF on a bounce domain, such as Postmark's or Amazon SES's default, and still fail DMARC on yours. DKIM and DMARC close that gap.

Each Return-Path domain and sending subdomain needs its own record, and every include in it costs lookups. Receivers count lookups as they evaluate. A sender matched before the 11th can still pass, mail from the services listed after it gets permerror. Order does not fix an over-limit record.

The SPF checker counts lookups, the SPF record generator rebuilds the record, what causes SPF permerror lists the rest, and SPF flattening is the last resort.

Google "recommends you use ~all"; Microsoft recommends -all for Microsoft 365 because it also recommends DKIM and DMARC. Of 2,969 B2B domains we read in October 2026, 61% of SPF records ended in ~all, 36% in -all, and 2.1% of domains had two records.

How we measured. We drew a random sample of 3,000 company domains from our B2B lead pool (80,425 domains with working MX records, collected in September 2026) and read their SPF and DMARC records from public DNS on October 15, 2026. 2,969 domains gave a usable answer. These are recipient domains, the companies cold emailers write to; our customers' sending domains were not part of the sample, and the pool leans toward small tech and agency companies. DNS changes, so treat the shares as a snapshot. Outreach2day data, October 2026.

Reference

SPF record syntax: mechanisms, modifiers and qualifiers

Single spaces separate terms: [qualifier]name[:domain][/cidr] for mechanisms, name=value for modifiers, placed last. Names ignore case; a syntax error anywhere is a permerror for every message.

  • v=spf1DNS lookups:0Exactly this, first, in lower case; v=spf10 is discarded
  • include:<domain>DNS lookups:1, plus its ownAnother domain's SPF servers; a target with no record is a permerror when reached
  • a / a:<domain>DNS lookups:1The domain's A and AAAA addresses
  • mx / mx:<domain>DNS lookups:1, max 10 MX hostsThe domain's MX servers, as in v=spf1 mx -all
  • ip4:<address or range>DNS lookups:0An IPv4 address or CIDR range; no mask means /32
  • ip6:<address or range>DNS lookups:0An IPv6 address or range; no mask means /128
  • exists:<domain>DNS lookups:1The sender, if the name resolves; Salesforce uses exists:%{i}._spf.mta.salesforce.com
  • ptrDNS lookups:1 or moreReverse DNS; RFC 7208 says it should not be published
  • allDNS lookups:0Everything, so it goes last; mechanisms after it are ignored
  • redirect=<domain>DNS lookups:1Another domain's record when nothing matched; ignored if all is present; once at most
  • exp=<domain>DNS lookups:0 during the checkA TXT record with the text shown on fail; once at most, ignored inside an include
  • unknown name=valueDNS lookups:0Ignored wherever it appears
  • + - ~ ?DNS lookups:0Qualifiers: pass (the default), fail, softfail, neutral

Sourcesource (opens the vendor's page in a new tab)

Rules and limits

What receivers enforce on SPF

Troubleshooting

Common SPF errors and fixes

For cold email

Mailboxes that come with the DNS records done

Outreach2day buys the domains, publishes SPF, DKIM and DMARC, creates the mailboxes and starts warmup, then sends your campaigns from its own sequencer or exports the mailboxes to Instantly or Smartlead.

  • SPF, DKIM and DMARC set for youOn every domain, checked after setup and kept in place
  • $2.50 a mailbox a month12-mailbox minimum; warmup and the sending engine included
  • 1,000+ mailboxesA volume price per mailbox, quoted on a call

Questions

How do I create a proper SPF record?

Put the includes of each service whose Return-Path is your domain, and your IPs, in one v=spf1 record ending in ~all or -all. Our SPF record generator counts lookups.

Do I type the quotes around an SPF record?

They are not part of the record. Route 53 wants them, Cloudflare adds them to new records, Squarespace says to remove them if the record fails to resolve.

How long does an SPF change take to work?

Receivers cache the old record until its TTL expires; at the 3,600-second minimum Microsoft recommends, that is up to an hour.

Does SPF pass when an email is forwarded?

Usually not: the forwarder's IP is missing from your record unless it rewrites the envelope sender. DMARC can still pass on aligned DKIM.

Where can I see the SPF result of an email I received?

Received-SPF or Authentication-Results in the headers gives the result and sending IP; in Gmail, use More next to Reply, then Show original.

What does SPF temperror mean?

A temporary DNS failure, such as a timeout, on the record or an include; a later retry can pass with no change.

Deliverability call

Talk to our deliverability team

Book a call with the people who run our mailbox infrastructure. We look at your current setup and tell you what to change. Running 1,000+ mailboxes? We also quote a volume price, warmup and sending included.

  • Review your domains, DNS records and current inbox placement
  • Size the setup: domains, mailboxes per domain and daily volume per mailbox
  • Plan warmup and the move from your current provider or sequencer
  • 1,000+ mailboxes: a volume price per mailbox for your setup

Free call

See open times in your time zone and book on this page.

Or open the booking page