How To Solve Email Issues After Adding A Site On Cloudflare

How to solve email issues after adding a site on Cloudflare

When switching to Cloudflare, the first thing that is done is add your DNS, and your IP address is proxied automatically, but there are records that need to stay on DNS only, meaning not proxied, and some of those records are:

  • MX records
  • SRV records
  • A record for mail.yourdomain.com

Most of the time when you find emails are not sent, it is during the time when Cloudflare syncs your DNS, but it only sees and adds a CNAME record for mail.yourdomain.com instead of an A record for mail.yourdomain.com

The A record in DNS (Domain Name System) specifies the IP address associated with a domain. In the context of email delivery, if the A record for the mail server is missing or incorrect, mail delivery may be affected because other mail servers rely on DNS to find the correct IP address to route emails.

When a sender tries to deliver an email, their mail server queries DNS for the recipient domain’s mail exchange (MX) record to determine the target mail server’s IP address. If the A record associated with that mail server is missing or incorrect, the sending server won’t be able to reach the intended mail server. This can result in email delivery failures or delays.

To enable your mails to start working again, you need to delete the CNAME record for mail.yourdomain.com and scroll on top and add an A record, named: (type: mail), IPv4 address: input your domain IP. Don’t forget this A record for mail shouldn’t be proxy.

Ensuring that DNS records, including A records, are correctly configured is crucial for the reliable and efficient delivery of emails.

3 comments

  1. Part of this procedure, after i had finished setting up my dns following the instructions, i had to clear Cloudflare cache for the emails to start working

Leave a Reply

Your email address will not be published. Required fields are marked *