Mailgun SPF & DKIM DNS records
Mailgun is a transactional email service; to send as your domain it needs include:mailgun.org in your SPF record, a TXT DKIM record and a DMARC record that you publish.
Last verified 2026-10-20 against the provider's documentation. Rows marked not re-verified come from earlier research. · Transactional email
Mailgun DNS records
| Record | Host | Type | Value | Source |
|---|---|---|---|---|
| SPF | @ | TXT | include:mailgun.org Add inside your existing v=spf1 record; never publish a second one. | Domain Verification verified 2026-10-20 |
| DKIM | Host shown per account | TXT | Generated in your Mailgun account; copy it from the console. | Domain Verification verified 2026-10-20 |
| DMARC | _dmarc | TXT | Start with v=DMARC1; p=none; rua=mailto:you@example.com. You publish this record; the provider does not. | DNSVerdict recommendation |
Who handles SPF for Mailgun?
You publish SPF. Add include:mailgun.org to your domain's single SPF record (RFC 7208 section 3.2 allows only one) before the all mechanism.
Source: Domain Verification (verified 2026-10-20)
DKIM for Mailgun
Mailgun publishes DKIM as a TXT record.
- DKIM is published as a TXT record that holds the public key (RFC 6376 section 3.6.1).
- The DKIM TXT host and value are shown in the Domain Verification & DNS section of the control panel. The page names no fixed selector.
Source: Domain Verification (verified 2026-10-20)
How DMARC passes with Mailgun
The documented setup can align through both SPF and DKIM.
Check your Mailgun setup
Compare your live DNS with these records.
More providers in Transactional email
FAQ
Do I add an SPF include for Mailgun?
Yes. Mailgun's documentation names include:mailgun.org. Add it inside your existing SPF record, because a domain may publish only one (RFC 7208 section 3.2).
How does Mailgun publish DKIM?
Mailgun publishes DKIM as a TXT record.
Who publishes the DMARC record for Mailgun?
You do. DMARC is a TXT record at _dmarc on your own domain (RFC 9989 section 4.5), and Mailgun cannot publish it for you.