Cloudflare MX Records

Follow these steps to setup mx records in your Cloudflare account.

S
Written by Sarah Bassett
Updated over a week ago

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 send emails via 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.

Type

Name

IPv4 address

Proxy status

A

mail

192.0.2.1

Proxied

2. An MX record that points to that subdomain.

Type

Name

Mail server

TTL

MX

@

mail.example.com

Auto

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.

Need more help?

Join us for live daily support - Book now.

Did this answer your question?