Cloudflare Email Setup: MX Records and Security Configuration

Modified on Fri, 13 Sep at 10:35 AM

To properly set up MX records in Cloudflare, follow this step-by-step guide to ensure your email system functions smoothly and securely.

Why Set Up Email Records?

Setting up MX records for your domain serves two primary purposes:

  1. Ensuring emails are correctly routed to your mail server.

  2. Protecting your domain from spoofing attempts by unauthorized senders.

Adding MX Records

Configuring email routing can be tricky, but organizing your DNS records through Cloudflare simplifies the process, ensuring messages are delivered accurately between mail servers. To get started, you will need to create two DNS records in Cloudflare:

1. A or AAAA Record: This directs traffic to your mail server's IP address.

Type

Name

IPv4 Address

Proxy Status

A

mail

192.0.2.1

Proxied


2. MX Record: This directs emails to the mail subdomain you've set up.

Type

Name

Mail Server

TTL

MX

@

mail.example.com

Auto


Configuring Email Security

It's essential to protect your domain's email system by setting up email security records. Follow these steps:

1. Log into the Cloudflare dashboard and choose your domain.


2. Navigate to the DNS section.


3. Click Configure under the Email Security option.

You will then have two options based on your domain’s email usage:

  • If your domain sends email, configure SPF, DKIM, and DMARC records to enhance security and authentication.

  • If your domain does not send email, use the restrictive email options to block unauthorized usage.

Configuring these security protocols helps protect your domain from spam, phishing, and other cyber threats, while also improving the deliverability and trustworthiness of your email communications.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article