Glossary

What is an SPF record?

Short answer

SPF, the Sender Policy Framework, is a DNS TXT record that lists which servers are allowed to send email using your domain in the envelope sender (MAIL FROM). Receiving servers check the connecting IP against that list and get a result such as pass, fail or softfail. SPF is defined in RFC 7208, allows at most 10 DNS lookups, and works with DKIM and DMARC.

Last checked 16 November 2026

SPF, the Sender Policy Framework, is a DNS TXT record that lists the servers allowed to send email for your domain. When a message arrives, the receiving server looks up the SPF record of the domain in the envelope sender and checks whether the connecting IP address is on the list. SPF is defined in RFC 7208.

How SPF works

  1. Your sending service connects to the recipient’s server and gives an envelope sender with MAIL FROM:<bounces@send.acme.com>. This is the Return-Path, not the From line people read.
  2. The receiver fetches the TXT record at send.acme.com that starts with v=spf1.
  3. It evaluates the mechanisms left to right (ip4, ip6, a, mx, include) until one matches the connecting IP.
  4. It returns a result: pass, fail, softfail, neutral, none, temperror or permerror.

RFC 7208 also recommends checking the HELO name, and requires the MAIL FROM check when the HELO check gives no definite result.

Example SPF record

send.acme.com.  TXT  "v=spf1 include:amazonses.com ~all"
Part Meaning
v=spf1 This is an SPF record
include:amazonses.com Also allow the servers in Amazon SES’s SPF record
~all Anything else is a softfail

A domain that sends from Google Workspace and an email API might publish v=spf1 include:_spf.google.com include:amazonses.com ~all on the root domain.

The 10-lookup limit

RFC 7208 section 4.6.4 caps the mechanisms that need a DNS query (include, a, mx, ptr, exists and redirect) at 10 per check. Go over and the result is permerror, which most receivers treat as a failure. Each include can pull in more lookups of its own, so a record with five includes can easily exceed the limit. The SPF too many lookups guide shows how to fix it.

Why it matters for app email

Gmail requires SPF or DKIM from every sender, and both, plus DMARC, from bulk senders (Google sender guidelines). For DMARC to pass on SPF, the envelope sender domain must align with the visible From domain, which is why providers ask you to put the bounce domain on a subdomain of your own, such as send.acme.com.

Common mistakes

  • Two SPF records on the same name. Merge them.
  • Too many includes, breaking the 10-lookup limit.
  • Using +all, which authorizes the whole internet.
  • Adding the provider to the root domain when the provider sends with a custom MAIL FROM subdomain. The record must be on the domain that appears in MAIL FROM.
  • Relying on SPF alone. It breaks on forwarding, so pair it with DKIM.

Check your record with our tools, and follow the SPF record guide for a full setup.

How Mailcandor handles it

When you add a domain, Mailcandor gives you the SPF record for send.<domain> and its deliverability coach checks that it resolves.

Questions

What does SPF stand for?

Sender Policy Framework. It is defined in RFC 7208.

Can a domain have two SPF records?

No. A domain must publish only one SPF record. Two records cause a permerror. Merge them into one record with several include mechanisms.

What is the difference between ~all and -all?

~all asks receivers to treat unlisted senders as a softfail, usually meaning accept but mark as suspicious. -all is a hard fail. With DMARC in place, ~all is a common, safe choice.

Does SPF check the From address people see?

No. SPF checks the envelope sender (Return-Path) and the HELO name. DMARC is what ties the result to the visible From domain.

Related

Send with someone on your side.

Unlimited domains on every plan, a person before any block, and 3,000 emails a month free. Tell us what you send and we set you up within one business day.