Steps to configure DNS and enable sending in Mailgun
Symptom / Need
If you need to use Mailgun to send emails, you need to properly configure your DNS records at your domain provider. This setup ensures that Mailgun can authenticate and send emails from your domain without any issues.
Context / Scenarios
Mailgun requires you to verify your domain and configure specific DNS records to enable email sending. This process involves:
✔️ Access your Mailgun account.
✔️ Verify your domain.
✔️ Add DNS records to your domain provider.
✔️ Confirm correct propagation of records.
These steps may vary depending on the DNS provider you use, so it is always a good idea to consult the official Mailgun documentation.
Answer (Solution/Recommendation)
➡️ Step 1: Access Mailgun
- Go to www.mailgun.com and log in with your credentials.
➡️ Step 2: Verify your domain in Mailgun
- If you haven't already, follow Mailgun's instructions to add and verify your domain:
🔗Domain Verification Guide - For more details about DNS in Mailgun, check out:
🔗 DNS FAQ
➡️ Step 3: Obtain the necessary DNS records
- Once your domain is verified, Mailgun will generate the TXT, MX, SPF and DKIM records that need to be configured with your DNS provider.
➡️ Step 4: Access the DNS settings on your provider
- Log in to your DNS provider account (e.g. Cloudflare, GoDaddy, Namecheap ).
- Find the section where your domain's DNS records are configured.
➡️ Step 5: Add Mailgun DNS records
- Within your provider's settings, add the DNS records provided by Mailgun:
✅ TXT Records : To verify the domain and enable DKIM/SPF.
✅ MX Records : To enable the handling of incoming emails if you require it.
✅ CNAME records : Yes, Mailgun recommends it for email tracking.
➡️ Step 6: Save changes and verify propagation
- Save changes to DNS settings.
- Please allow a few minutes or hours for global propagation of the records.
- Use tools like "Dig" , "nslookup" or the Mailgun dashboard itself to check if the configuration is correct.
➡️ Step 7: Additional configuration (optional)
- If needed, configure additional records such as SPF, DKIM or CNAME as recommended by Mailgun.
📌 Important:
- If you experience configuration issues, please review the official Mailgun documentation or contact your DNS provider's support.
- For more details on DNS settings in Mailgun, see:
🔗 Mailgun DNS Guide