Authorize Mailgun to send transactional email on behalf of your domain by adding the correct SPF include.
TXT
@
v=spf1 include:mailgun.org ~all
Add include:mailgun.org to your existing SPF record.
Go to app.mailgun.com and sign in.
Navigate to Sending > Domains > Add New Domain. Enter your domain (or a subdomain like mg.yourdomain.com).
Mailgun will display the DNS records you need. The SPF record uses include:mailgun.org.
Add include:mailgun.org to your existing SPF record, or create a new one.
v=spf1 include:mailgun.org ~allClick "Verify DNS Settings" in Mailgun. It will check all required records.
v=spf1 include:_spf.google.com ~allv=spf1 include:_spf.google.com include:mailgun.org ~allAfter adding your DNS records, use our free SPF checker to verify everything is configured correctly. DNS changes typically propagate within minutes, but can take up to 48 hours.
Add include:mailgun.org to your SPF record. If you send from a subdomain like mg.yourdomain.com, add the SPF record to that subdomain.
Yes. Mailgun recommends using a subdomain (e.g., mg.yourdomain.com) to isolate transactional email reputation from your root domain.
Yes. Use a subdomain for Mailgun (e.g., mg.yourdomain.com with its own SPF) and keep your root domain SPF for Google Workspace.