How to set the domain to Cloudflare if the mail is hosted?

Minor corrections to the DNS zone records will be required. These are the addresses of the MX mail server, which are used to direct mail to the appropriate servers. When the Cloudflare service is enabled, the A record for the main domain will receive a new IP or will be converted into CNAME for the new domain, as a result of which the mail will stop working properly.

At this point we have to configure the appropriate records so that the mail is correctly directed to our hosting.

Configuring MX records to Cloudflare

Below is an example of our domain thecamels.eu, which is to be directed to IP 95.216.28.46 - remember to choose a domain name and IP according to your needs!

  1. Login to CloudFlare and proceed to edit the zone for our domain.
  2. Edit record for the mail subdomain, and main MX record, also check SPF and DKIM record if its correct.
    NOTE: Those need to be excluded from traffic proxy by Cloudflare - the cloud must be gray. Then we will be sure that the mail will arrive correctly on our servers.
    Cloudflare mail configuration
  3. After changes approval, you need to wait for the DNS zone propagation to complete.
  4. Similar domain name change will need to be made in configuration of all types of mail clients or mobile devices that you use.
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How to direct a domain to hosting if it is on CloudFlare?

If it is required to have a domain on Cloudflare DNS servers and simultaneously redirect it to...

Problems with generating free SSL certificate after switching to CloudFlare

Let's Encrypt certificates to be generated need the domain to point to our DNS or our hosting....