What Is an SPF Record and How Do I Set One Up?

SPF (Sender Policy Framework) is a DNS TXT record that lists which mail servers are authorized to send email on behalf of your domain. Receiving mail servers check this record to help decide if an incoming message claiming to be from your domain is legitimate.

How it works

When an email arrives claiming to be from yourdomain.com, the receiving server looks up your domain’s SPF TXT record and checks whether the sending server’s IP is listed as authorized. If not, the message can be flagged, quarantined, or rejected depending on the receiver’s policy.

Setting it up

  1. List every service that legitimately sends email as your domain (your mail provider, marketing tools, transactional email services, etc.)
  2. Publish one SPF TXT record listing all of them — multiple SPF records for one domain is invalid and causes failures
  3. End with the appropriate qualifier (-all for strict enforcement, ~all for a softer "flag but don’t reject" policy)

FAQ

Can I have two separate SPF records for redundancy?

No — having more than one SPF TXT record on a domain is explicitly invalid per the specification and will cause SPF checks to fail entirely.

Updated at: .