When configuring Sender Policy Framework (SPF) records, the include
mechanism allows you to reference external SPF policies. This becomes essential when multiple services (like Google Workspace or third-party email providers) send emails on your domain's behalf.
To combine multiple SPF includes in a single TXT record, simply list them sequentially within the same SPF record. Here's the correct format:
v=spf1 include:_spf.google.com include:otherdomain.com ~all
1. DNS Lookup Limits: SPF has a maximum of 10 DNS lookups. Each include
typically counts as one lookup.
2. Order Doesn't Matter: The sequence of includes doesn't affect evaluation (unless using modifiers like redirect
).
3. Termination: Always end with ~all
(soft fail) or -all
(hard fail).
For a domain using both Google Workspace and SendGrid:
v=spf1 include:_spf.google.com include:sendgrid.net ~all
When combining includes with direct IP authorizations:
v=spf1 ip4:192.0.2.0/24 include:_spf.salesforce.com include:spf.protection.outlook.com ~all
Always verify your SPF record using tools like:
- MXToolbox SPF Checker
- Google Admin Toolbox
- Kitterman SPF Validator
Remember that SPF records have a 255-character limit for each string segment. For longer configurations, split into multiple strings:
"v=spf1 include:_spf.google.com include:spf.mailjet.com "
"include:servers.mcsv.net ~all"
SPF (Sender Policy Framework) records are crucial for email authentication. When you need to authorize multiple email services or domains to send emails on your behalf, you'll need to combine multiple include
mechanisms in a single TXT record.
Here's how to properly combine multiple SPF includes:
v=spf1 include:_spf.google.com include:otherdomain.com ~all
Key points to remember:
- Use only one
v=spf1
prefix - List all includes separated by spaces
- Maintain a single
~all
or-all
at the end
Here's a more comprehensive example including common email services:
v=spf1 include:_spf.google.com
include:servers.mcsv.net
include:mail.zendesk.com
include:_spf.salesforce.com
~all
When combining multiple SPF includes:
- DNS lookups: Each include counts toward the 10-DNS-lookup limit
- Order doesn't matter: SPF evaluates mechanisms left-to-right
- Validation: Always test your SPF record using tools like MXToolbox
If you encounter problems:
- Check for duplicate
v=spf1
declarations - Ensure no line breaks in the DNS record (unless using quoted strings)
- Verify all included domains have valid SPF records