How to Create an SPF Record: Generator Guide for Common Email Providers
Don't have an SPF record? Here's how to build one for Google Workspace, Microsoft 365, SendGrid, Mailchimp, and other common email providers.
What you need before creating an SPF record
Before writing your SPF record, identify all services that send email on behalf of your domain:
1. Your primary email provider (Google Workspace, Microsoft 365, Zoho) 2. Any marketing email platforms (Mailchimp, Klaviyo, HubSpot, Constant Contact) 3. Transactional email services (SendGrid, Postmark, Mailgun, AWS SES) 4. CRM systems that send email (Salesforce, HubSpot) 5. Your own servers or applications that generate email 6. Any other third-party services (helpdesks like Zendesk, scheduling tools, etc.)
Missing a service means email from that service will fail SPF.
SPF includes for major providers
Google Workspace: include:_spf.google.com Microsoft 365: include:spf.protection.outlook.com SendGrid: include:sendgrid.net Mailchimp (Mandrill): include:spf.mandrillapp.com Mailgun: include:mailgun.org AWS SES: include:amazonses.com (or region-specific) Zendesk: include:mail.zendesk.com Salesforce: include:_spf.salesforce.com HubSpot: include:_spf.hubspot.com Zoho Mail: include:zoho.com Constant Contact: include:spf.constantcontact.com FastMail: include:spf.messagingengine.com
# Google Workspace only
v=spf1 include:_spf.google.com -all
# Microsoft 365 only
v=spf1 include:spf.protection.outlook.com -all
# SendGrid only
v=spf1 include:sendgrid.net -all
# Google Workspace + SendGrid + dedicated IP
v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.5 -all
# Multi-service: Google + Mailchimp + HubSpot
v=spf1 include:_spf.google.com include:spf.mandrillapp.com include:_spf.hubspot.com -allCommon SPF include: values by provider
| Email Provider / Service ↕ | SPF include: value ↕ | DNS Lookups Used ↕ |
|---|---|---|
| Google Workspace | include:_spf.google.com | 1 (expands to ~4 sub-lookups) |
| Microsoft 365 | include:spf.protection.outlook.com | 1 |
| SendGrid | include:sendgrid.net | 1 |
| Mailchimp (Mandrill) | include:spf.mandrillapp.com | 1 |
| Mailgun | include:mailgun.org | 1 |
| AWS SES (us-east-1) | include:amazonses.com | 1 |
| HubSpot | include:_spf.hubspot.com | 1 |
| Salesforce | include:_spf.salesforce.com | 1 |
| Zendesk | include:mail.zendesk.com | 1 |
| Postmark | include:spf.mtasv.net | 1 |
Building your SPF record
Start with v=spf1 and add your includes:
v=spf1 include:_spf.google.com include:sendgrid.net -all
If you have specific IP addresses (your own servers), add them with ip4:
v=spf1 ip4:203.0.113.5 include:_spf.google.com include:sendgrid.net -all
End with -all (hard fail — reject unauthorized senders) or ~all (soft fail — mark with suspicion). Start with ~all while you're still discovering all your sending sources; switch to -all once you're confident the record is complete.
Publishing your SPF record
Add a TXT record to your domain's DNS: - Name/Host: @ (or leave blank, meaning the root domain) - Type: TXT - Value: v=spf1 include:... -all - TTL: 3600 (1 hour) or your DNS provider's default
Important: Only one SPF record is allowed per domain. If you already have one, edit it rather than adding a new TXT record.
After publishing, wait 1-48 hours for DNS propagation, then use an SPF checker to verify the record resolves correctly and count your DNS lookups.
Check your domain's email health
Run a free scan against 60 blacklists. Validate SPF, DKIM, DMARC, and MX records in seconds.
Related free tools