Setup Mailgun with Cloudflare subdomain

Viewed 3143

I'm trying to setup my domain to receive emails through Mailgun and Cloudflare, and i think i'm really closest but can't make it work.

In Mailgun, i've all DNS verified:

enter image description here

I think the problem is in Cloudflare, configuring the subdomain (that Mailgun suggest me to create mg.mydomain.com)

enter image description here

I have not got any record related with the subdomain (mg.mydomain.com). Is any change i'm something?

Also, I already setup a Route in mailgun to redirect incoming emails to my email address.

Thanks in advance!

2 Answers

I found the answer here: https://community.cloudflare.com/t/setting-mx-records-for-a-subdomain/4942/2

What you need to do is:

On Mailgun:

  1. Setup a domain for your incoming email (e.g.: foo.example.com)

On Cloudflare:

  1. Go to DNS
  2. Add an A record for your subdomain (foo.example.com)
  3. Add an MX record. For the first field (name), put: foo.
  4. When you click 'click to configure', it will open a dialog box where you can put the values for mxa.mailgun.org
  5. Repeat for mxb.mailgun.org

For the CNAME record, you just need to make sure that the status is configured as 'DNS Only' (the little cloud on the right is grey)

Cloudflare DNS Configurations

Related