Cloudflare MX Records

Set up email records

To set up MX records for your domain in Cloudflare, follow these steps. It's worth noting that there are two main reasons for setting up email records for your domain. Firstly, to ensure email delivery to your mail server, and secondly, to prevent other senders from spoofing your domain.

​​Add MX records

The setup of email routes can seem challenging. Luckily, changing your DNS records in an organized fashion in Cloudflare allows for successful message delivery from one mail server to another.

To route emails to your mail server, you need to create two DNS records within Cloudflare:

  1. An A or AAAA record for your mail subdomain that points to the IP address of your mail server.
TypeNameIPv4 addressProxy status
Amail192.0.2.1Proxied
  1. An MX record that points to that subdomain.
TypeNameMail serverTTL
MX@mail.example.comAuto

Configure email security records

To configure email security records for your domain:

  1. Log in to the Cloudflare dashboardOpen external link and select your domain.
  2. Go to DNS.
  3. For Email Security, click Configure.
  • If your domain sends email, use the available options to set up SPF, DKIM, and DMARC records.
  • If your domain does not send email, use the Your domain is not used to send email section to set up restrictive email records.

It's important to configure your email security records to protect your domain from spam and phishing attacks, and to ensure the deliverability and authenticity of your email communications.

Was this article helpful?

Click-To-Call, Click-To-Text, and Click-To-Email Links & Buttons
Code Element