SPF (Sender Policy Framework) is an email authentication protocol that helps prevent unauthorized senders from sending emails on behalf of your domain. By verifying which servers are allowed to send email, SPF protects your domain from spoofing and phishing.
This guide will walk you through how to set up SPF for Mailgun, a transactional email service that enables secure and reliable email delivery at scale.
Note: If you’re already using Sendmarc for SPF management, simply copy ‘include:mailgun.org’ and follow the steps here.
To authorize Mailgun to send emails on your domain’s behalf:
Example of an updated SPF record:
Host | Type | Value |
---|---|---|
@ or blank | TXT | v=spf1 include:another.net include:mailgun.org ~all |
Example of a new SPF record:
Host | Type | Value |
---|---|---|
@ or blank | TXT | v=spf1 include:mailgun.org ~all |
Allow up to 48 hours for DNS propagation, depending on your DNS host.
For detailed instructions on how to update your SPF record through Sendmarc, refer to the Sendmarc SPF Setup Documentation.
Refer to Mailgun’s official documentation for SPF setup here.
Find out how to configure your Mailgun DKIM settings here.