Mailgun Setup - CloudFlare Domain Setup

TABLE OF CONTENTSStep-by-step Mailgun SetupTo add the 1st TXT recordTo add the 2nd TXT recordTo add the 1st MX recordsTo add the 2nd MX recordsTo add the CNAME recordStep-by-step…

Step-by-step Mailgun SetupTo add the 1st TXT recordTo add the 2nd TXT recordTo add the 1st MX recordsTo add the 2nd MX recordsTo add the CNAME recordStep-by-step Mailgun Setup1. Sign up for Mailgun.com2. Check your email inbox to verify the email address3. Login to Mailgun, Click on Sending > Add New Domain4.

If your domain is companyname.com, you can either set up the main domain or subdomain with Mailgun. A. Main domain: If you are adding the main domain, it should not be used with Gsuite, or any other email provider Subdomain: To set up the subdomain with Mailgun, you can type ANYTHING_HERE.companyname.comExamples:mg.companyname.comreplies.companyname.comsupport.companyname.comB.

Please set up the domain or subdomain under US, not EU. not EU. not EU. C. Click on Add domainThe next screen that you're taken to will ask you to add DNS records to your domain. Leave this screen open for the next step.

5. Now log in to your DNS records based on where you get the domain and add the 5 DNS records. To add the 1st TXT recordTo Add your first TXT record, Log in to the Cloudflare dashboard and select an account and domain. Click on DNS > RecordsClick on + Add RecordA.

Type: Select TXT from the Type menu options. B.

  • Name: DO NOT INCLUDE THE ROOT DOMAINDepending on the subdomain you are trying to set up, if you are trying to set upmg.companyname.com The host name will be mgreplies.companyname.com The host name will be repliesIf you are setting up a main domain like companyname.com, the host name will be @C.
  • Content: Same for everyonepaste the following record v=spf1 include:mailgun.org ~allD.

Click on SaveTo add the 2nd TXT recordClick on + Add Record againA. Type: Select TXT from the Type menu options. B.

  • Name: it's a bit tricky but the key here is to copy everything from the beginning until the subdomain part, DO NOT INCLUDE THE ROOT DOMAIN**Everyone's 2nd TXT record host name and value is differentExamples: copy the highlighted part ONLYExample 1 using subdomain: Copy mx._domainkey.helpdesk as the host nameExample 2 using main domain: Copy mailo._domainkey as the host nameC.
  • Content: Head back to Mailgun and Copy the 2nd TXT record here highlighted in the screenshot belowContent: paste the 2nd very long copied TXT record hereD.

Click on SaveTo add the 1st MX recordsClick on + Add Record againIf you have a Gsuite account to capture incoming emails for the main domain. Make sure you are using a subdomain for Mailgun. Check out Can I Use the Same Domain Name for Mailgun and for Google Apps (Or Another Email Server)? A.

Type: Select MX from the Type menu options. B.

  • Name: Different for everyoneDepending on the subdomain you are trying to set up, if you are trying to set upmg.companyname.com The host name will be mgreplies.companyname.com The host name will be repliesIf you are setting up a main domain like companyname.com, the host name will be @C.
  • Mail Server: Same for everyone paste the following data mxa.mailgun.org D.

Priority is 10 which is also same for everyone no matter what domain you are trying to setE. Click on SaveTo add the 2nd MX recordsClick on + Add Record againA. Type: Select MX from the Type menu options. B.

  • Name: Different for everyoneDepending on the subdomain you are trying to set up, if you are trying to set upmg.companyname.com The host name will be mgreplies.companyname.com The host name will be repliesIf you are setting up a main domain like companyname.com, the host name will be @C.
  • Mail Server: Same for everyone paste the following data mxb.mailgun.org D.

Priority is 10 which is also same for everyone no matter what domain you are trying to setE. Click on SaveTo add the CNAME recordIn Cloudflare, Click on + Add Record againA. Type: Select CNAME from the Type menu options. B.

  • Name: Different for everyoneHead back to Mailgun to copy the host name, it's a bit tricky but the key here is to copy everything from the beginning until the subdomain part, DO NOT copy the main domainDepending on the subdomain you are trying to set up, if you are trying to set upmg.companyname.com The host name will be email.mgreplies.companyname.com The host name will be email.repliesIf you are setting up a main domain like companyname.com, the host name will be emailC.
  • Target: Same for everyone paste the following data mailgun.orgD.

Click on the orange cloud Proxied to make it DNS onlyE. Click on SaveNow that you have added 5 records, Go back to Mailgun and click on Verify DNS SettingsClick the same button to Verify DNS Settings again if some records are still not showing the green checkmarkOnce you add all the DNS records and verify, you can grab the Mailgun API Key - Where to Find in Mailgun & Put in AcommadorThen we could send a test email to see if everything works!

Click here to learn How to send a test email in the Conversation

Can't find what you need? Log in and use the in-app chat, or talk to our team.