How to set up DMARC on Mailgun

Step by step DMARC setup for Mailgun: complete instructions, examples, verification commands, and common pitfalls.

Want to check your domain while following this guide?

Run a free SPF, DKIM and DMARC check on your domain to see exactly what is passing and what needs fixing.

No signup required. Works on any domain.

This is a reference guide for configuring DMARC on Mailgun. Use it while editing DNS or when troubleshooting deliverability.

Tip: Here’s a reliable, copy-pasteable way to set up DMARC using Mailgun. Then verify everything with the InboxGreen Free Checker.

Provider-specific notes for Mailgun

  • Mailgun provides specific TXT and CNAME values unique to your domain. Copy them exactly from the Mailgun DNS Records panel - do not guess the values.
  • Mailgun DKIM can use either TXT or CNAME depending on your plan. Check the DNS Records tab in your Mailgun domain settings for the correct format.
  • Mailgun → Sending → Domains → Domain DNS Records.

DMARC policy ladder

DMARC connects SPF and DKIM to the visible From domain. The safe approach is to start in monitoring, fix alignment issues, then gradually move to stricter policies.

StageTXT valueWhen to use it
Monitor v=DMARC1; p=none; rua=mailto:[email protected]; fo=1 Collect reports and understand who sends on your behalf.
Quarantine v=DMARC1; p=quarantine; pct=25; rua=mailto:[email protected]; fo=1 Quarantine a portion of failing mail. Raise pct as confidence grows.
Reject v=DMARC1; p=reject; pct=100; rua=mailto:[email protected]; fo=1 Full protection once alignment is good and monitored.

Publish DMARC

  1. Create a TXT record at host _dmarc with your chosen value.
  2. Make sure the rua address exists and can receive XML reports.

Verify and troubleshoot

dig TXT _dmarc.yourdomain.com +short
nslookup -type=txt _dmarc.yourdomain.com
  • Check that either SPF or DKIM aligns with the visible From domain.
  • Debug failing sources before moving beyond p=none.

Pro tip: Turn on InboxGreen Monitoring to check these records daily and get alerts if something breaks.

Free Deliverability Scan

Check SPF, DKIM, DMARC and List-Unsubscribe for your domain in seconds.

Useful tools