Email Deliverability
SPF (Sender Policy Framework) is an email authentication standard that prevents spammers from sending emails on behalf of your domain. Learn how to set it up correctly to improve your email deliverability.
SPF (Sender Policy Framework) is like a bouncer for your email domain. It tells receiving email servers which IP addresses and servers are allowed to send email on behalf of your domain.
When an email is received, the receiving server checks the SPF record in your DNS to verify that the sender is authorized. If the IP address isn't listed in your SPF record, the email may be rejected or marked as spam.
Without SPF, anyone can forge emails that appear to come from your domain. This leads to:
First, list all services that send email from your domain:
An SPF record is a TXT record in your DNS that starts with v=spf1. Here's a basic example:
v=spf1 include:_spf.google.com include:amazonses.com ~all
Let's break this down:
v=spf1 - Version identifier (always required)include:_spf.google.com - Allow Google's mail serversinclude:amazonses.com - Allow AWS SES servers~all - Soft fail for everything else (mark as suspicious)Important: Only have ONE SPF record per domain. Multiple SPF records will break email authentication.
Common SPF mechanisms:
ip4:192.0.2.0 - Allow specific IPv4 addressip6:2001:db8:: - Allow specific IPv6 addressa - Allow IP addresses in the domain's A recordmx - Allow the domain's MX serversinclude:domain.com - Include another domain's SPF recordQualifiers (what happens if a mechanism matches):
+ - Pass (default, can be omitted)- - Fail (reject the email)~ - Soft fail (mark as suspicious)? - Neutral (no policy) SPF has a limit of 10 DNS lookups. Each include: counts as a lookup. If you exceed this limit, SPF fails entirely.
Solution: Minimize includes. Use IP addresses directly when possible, or use SPF flattening tools.
Having more than one SPF TXT record breaks SPF validation.
Solution: Combine all your mechanisms into a single SPF record.
Legitimate emails fail SPF if you forget to include a service that sends on your behalf.
Solution: Audit all email-sending services and update your SPF record accordingly.
When using ListMailer or other bulk email tools via SMTP:
include:amazonses.cominclude:_spf.google.comGoogle Workspace only:
v=spf1 include:_spf.google.com ~all
Google Workspace + AWS SES:
v=spf1 include:_spf.google.com include:amazonses.com ~all
Multiple services:
v=spf1 include:_spf.google.com include:amazonses.com include:sendgrid.net ~all
Complete your email authentication setup:
Worried about email deliverability? ListMailer's new testing feature automatically checks your SPF, DKIM, and DMARC setup and provides actionable recommendations. Start testing now →