How to Combine SPF Records
What is an SPF Record?
SPF (Sender Policy Framework) is a DNS-based email authentication mechanism that helps prevent email spoofing. It defines which mail servers are allowed to send emails on behalf of a domain.
SPF records should always be published as a TXT record in your DNS settings, even if your DNS provider offers an "SPF" record type. The SPF-specific type was deprecated, so using a TXT record ensures compatibility across all email services.
Why you might need to combine SPF Records for Multiple Services
If your domain uses multiple email services (e.g., ImprovMX for forwarding and another provider for outbound email), you must combine their SPF records into a single entry. A domain can have only one SPF record, and multiple SPF records will cause authentication failures.
Example Scenario
You use:
ImprovMX for email forwarding (SPF:
v=spf1 include:spf.improvmx.com ~all
)Google Workspace for sending emails (SPF:
v=spf1 include:_spf.google.com ~all
)
Instead of adding both SPF records separately, you must merge them into a single record:
v=spf1 include:spf.improvmx.com include:_spf.google.com ~all
Explanation
v=spf1
- This declares the record as an SPF record.include:spf.improvmx.com
- Authorizes ImprovMX’s mail servers.include:_spf.google.com
- Authorizes Google’s mail servers.~all
- A soft fail directive, meaning that non-listed servers are not recommended but won’t be outright rejected.
How to Add the SPF Record in DNS
Note: We have DNS configurations guides (with screenshots) for some popular providers here.
Log in to your domain registrar or DNS hosting provider.
Navigate to your DNS settings.
Add a new TXT record (or edit the existing SPF record if you already have one).
Host/Name:
@
(or your domain name if required)Type:
TXT
Value:
v=spf1 include:spf.improvmx.com include:_spf.google.com ~all
Save the changes and wait for DNS propagation (which can take up to 48 hours).
Common Mistakes to Avoid
Multiple SPF records: You must combine all services into a single SPF record.
Using the deprecated SPF type: Always use a
TXT
record instead of theSPF
record type.Exceeding the SPF lookup limit: SPF has a limit of 10 DNS lookups. Too many
include:
mechanisms can cause failures. If needed, consider SPF flattening services.
Testing Your SPF Record
To verify your SPF record, use an SPF validation tool such as:
By correctly combining your SPF records, you ensure that your emails pass SPF authentication, reducing the risk of spoofing and improving email deliverability.