← All guides

Authenticate Mailgun for your domain

When Mailgun sends mail as your domain, receivers check that it is DKIM-signed or SPF-authorized for that domain. Without it, a strict DMARC policy will send that mail to spam or bounce it.

1. Set up Mailgun

In Mailgun, open Sending → Domains → DNS records and publish the DKIM TXT record and the SPF include it lists for your sending domain.

2. Publish a DMARC record (if you don't have one)

Create a TXT record named _dmarc with a monitoring-only policy:

v=DMARC1; p=none; rua=mailto:<your report address>

Reports show whether Mailgun and your other services pass. Tighten the policy only when they all do.

3. Check it

Need help adding the records? See how at Cloudflare, GoDaddy, Namecheap, Amazon Route 53, Squarespace Domains, Porkbun. Add them where your domain's nameservers point.

DNS changes usually appear within an hour. Then check your domain.

Steps are typical; menus change. If something doesn't match, check Mailgun's own help pages.