SpoofLock

Set up DKIM and SPF for Mailgun

Make email sent through Mailgun pass DMARC for your domain.

DKIM

  1. In Mailgun open Sending → Domains → Add new domain and add yourdomain.com or a subdomain of it.
  2. Publish the TXT records shown: the SPF record and the DKIM key at <selector>._domainkey.yourdomain.com.
  3. Click Verify DNS settings.

SPF

Add include:mailgun.org to the SPF record on yourdomain.com. If you have no SPF record yet, publish:

v=spf1 include:mailgun.org -all

A domain may have only one SPF record; merge this into an existing one rather than adding a second. Check the result with the SPF checker.

Mailgun's own documentation

Check it worked

DNS changes take up to an hour. Then send a test message to a Gmail address, open it, choose Show original, and look for dkim=pass with header.d=yourdomain.com. Or just watch your SpoofLock dashboard: the sender turns green once reports show it passing.

Not sure which services send as your domain?

DMARC reports list every one of them. SpoofLock collects the reports, names the services and shows these instructions next to each one that is not passing yet. One domain free.

Start free

Other providers