Domain – The incompatibility between Cloudflare and the reverse DNS

cloudflaredomainhostingipreverse-dns

I'm already activated Cloudflare for my website and to apply that I had to replace my domain default nameservers with Cloudflare nameservers. Now my website has to send emails to the mail servers, but I have a problem with that, especially with the 3 major mail servers.

Gmail and Hotmail receive my website emails in Spam/Junk folder not in inbox, and Yahoo mail doesn't receive messages from my website at all. So in order to solve this issue I was recommended to set a reverse DNS for my website.

Now to do that I had to set a PTR records in my domain settings so reverse DNS lookup of my hosting IP should lead to my domain, but because my domain provider ( name.com ) doesn't offer that, I was told to solve this issue through my hosting provider ( OVH ). But my hosting provider told me I have to solve this issue with Cloudflare support as long as I use Cloudflare servers to protect my website. In Cloudflare support section I read that they don't offer PTR records too and such issue should be solved by the hosting provider, so I'm really stuck in a very narrow place now!

The reverse DNS lookup ( my hosting IP ) leads to my domain, but DNS lookup ( my domain ) leads to Cloudflare IP not to my hosting IP.

If I removed Cloudflare namerservers and bring back the default nameservers in my domain account the problem will be solved, but I need to keep Cloudflare in my website, and in the same time I need my website outcoming emails be accepted by all email servers.

Can you help me to solve this issue.

Best Answer

The PTR record will need to be set at OVH, however, before being able to do that, you will need to create an A record at CloudFlare for the servers hostname and set that record to not pass through CloudFlare. Say, for example, if your server name is server.domain.com, do the following:

  • In CloudFlare, create an A record for server.domain.com with the IP of your server. Make sure it does not pass through CloudFlare.
  • Ask OVH to setup Reverse DNS for your IP to server.domain.com.
  • Make sure the MTA on your server uses server.domain.com in the HELLO line. Usually it sets it automatically from the hostname.
Related Topic