How to configure Mailgun in your DNS
Follow these 4 straightforward steps to publish your authentication records on Cloudflare, GoDaddy, Namecheap, or AWS Route 53.
Add Domain in Mailgun Dashboard
Add your sending domain or subdomain (e.g., mg.yourdomain.com) inside the Mailgun control panel.
Add Mailgun SPF Record
Create a TXT record with include:mailgun.org on your chosen sending host.
v=spf1 include:mailgun.org ~allPublish Mailgun DKIM Key
Publish the 2048-bit DKIM TXT record (Host: k1._domainkey) provided by Mailgun.
Publish DMARC Policy
Ensure a DMARC policy is published on your root domain (@) to cover all subdomains.
v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@yourdomain.com; pct=100Frequently Asked Questions for Mailgun
Technical answers regarding lookup limits, multiple records, and delivery errors.
Why does Mailgun suggest using a subdomain like mg.yourdomain.com?▼
Does Mailgun SPF include require a MX record?▼
Common Providers Used with Mailgun
Send marketing and transactional emails alongside your corporate inbox.
Twilio SendGrid
High-Volume Transactional & Marketing Email API
Postmark
Lightning-Fast Transactional Email with Dedicated Streams
Brevo (formerly Sendinblue)
All-in-One CRM, Marketing Campaigns & Transactional SMS/Email
Amazon SES (Simple Email Service)
Scalable AWS Cloud Infrastructure for Transactional Email
Need to combine multiple providers into one SPF record?
Our full in-browser engine merges SPF records, calculates RFC 7208 lookups in real-time, and generates custom DMARC policies.