Frequently asked questions
Why are my Mailgun emails going to spam?
The most common causes are SPF not including include:mailgun.org, DKIM records not published in DNS (Mailgun requires you to add CNAME or TXT records yourself), no DMARC policy, or Mailgun configured on your root domain when it should be on a dedicated sending subdomain.
Run a free InboxGreen check on your sending domain to identify exactly what is misconfigured.
What SPF record do I need for Mailgun?
Add include:mailgun.org to your SPF record. A basic record looks like:
v=spf1 include:mailgun.org ~all
If you send from other services too (Google Workspace, etc.), include them as well. Use the SPF Generator to build it correctly.
If you use a Mailgun sending subdomain (e.g. mg.yourdomain.com), the SPF record goes on that subdomain, not your root domain.
Does Mailgun set up SPF and DKIM automatically?
Mailgun provides the DKIM records (CNAME or TXT) that you must publish in your own DNS. It does not manage SPF for you. Mailgun's domain verification panel will show whether DKIM and SPF are detected, but it does not check your overall DMARC configuration. Use InboxGreen for a complete picture of all three.
Should I send Mailgun emails from a subdomain?
Using a dedicated sending subdomain like mg.yourdomain.com or mail.yourdomain.com is a common Mailgun setup.
It isolates your transactional email reputation from your root domain.
When using a subdomain, the SPF, DKIM, and DMARC records must be set up on that subdomain, not just the root domain.
Run an InboxGreen check on the subdomain to confirm everything is correctly configured.