Fix guide
How to Fix DMARC Alignment for Mailgun
Mailgun DMARC alignment requires adding a custom sending domain with CNAME records for DKIM signing and a custom Return-Path. Without these, Mailgun sends from @mailgun.org, failing DMARC alignment with your From: domain.
Why alignment fails
Without a verified sending domain, Mailgun uses a Return-Path that doesn't match your From: domain. DMARC alignment needs aligned SPF and/or DKIM for your brand domain.
Exact DNS records (pattern)
Mailgun shows exact values per domain. Typical patterns:
Step-by-step fix
Verify alignment and DNS in your browser
Open DNS Preflight →FAQ
Should I use yourdomain.com or mg.yourdomain.com as my Mailgun domain?
Use your root domain (yourdomain.com) for best DMARC alignment. Using a subdomain like mg.yourdomain.com can cause alignment failures with strict DMARC policies.
Why does Mailgun fail DMARC even after adding DNS records?
Check that you added the domain-specific DKIM record, not just SPF. Also verify the Return-Path CNAME is added — this enables SPF alignment.
How many DNS records does Mailgun require?
Typically 3: one TXT for SPF (include:mailgun.org), one TXT or CNAME for DKIM, and one CNAME for the Return-Path (tracking subdomain).
What is the Mailgun DKIM selector?
Mailgun uses k1 as the default DKIM selector. Your DKIM record goes at k1._domainkey.yourdomain.com.
How long does Mailgun domain verification take?
DNS propagation takes up to 48 hours. Mailgun's dashboard shows a green checkmark when all records are verified.