I have an interesting problem. I am using namecheap as domain name provider. And mailcheap as mail provider. I use Cloudflare to setup MX records. And was using heroku for hosting recently.
Then heroku decided to remove free dynos. So I decided to change my hosting provider. I added some files to a hosting provider using their client. Then all my DNS records changed to their system. Now my MX records are not working and I am getting address not found errors when I try to send e-mail from gmail to my emails under my domain. I am able to send from my domain email to gmail by the way. And when I reply I get address not found again.
So my question is simple. If I setup Cloudflare as custom DNS on namecheap how can it be possible for some other DNS server to interfare with MX records? Then how can I fix this?
If you use Cloudflare for DNS, the MX entries are configured on Cloudflare and whatever you have configured will be the authoritative mail server. This won’t change unless you change it or you provided access via the API to third parties, in which case you may want to change your password and revoke any API keys.
Just after I wrote this e-mail MX records seems to be restored. I was using surge-sh as my new hosting provider. It seems there is some sort of DNS propagation issue. Since I just changed my nameservers on namecheap to their simpleDNS for a brief time. I opened an issue on their github. And reply was that surge-sh should not interfere with DNS just a response mapping on cluster side.
But it is still odd that my domain seems to be still directly resolving to their servers by-passing Cloudflare. This may be caused by my local DNS. I will try to flush it and then wait for things to get normalized again.
By the way when I check my DNS propogation using whatsmydns It is showing 104.21.78.73 and 172.67.217.221 for A record and nothing in CNAME. It was showing 138.197.235.123 for CNAME while MX records was not working. 138.197.235.123 seem to be surge-sh and makes sense but are the new ones related to Cloudflare? nslookup command is giving no info.
Well, any mail records should not be proxied, so make sure that everything is .
But apart from that everything will be exactly as you had it configured on Cloudflare and if you had any mail errors, you need to contact your mail host as Cloudflare would not be involved.