Setting up MX records for your domain in Cloudflare is an important step in ensuring reliable email delivery and protecting your domain from email spoofing. When configured correctly, they route emails to your mail server and help keep your communications secure. Follow the steps below to set up MX records for your domain in Cloudflare.
Add MX records
Setting up email routes can feel daunting. Fortunately, updating your DNS records in an organised way in Cloudflare makes it straightforward to route messages between mail servers.
To route emails to your mail server, you need to create two DNS records within Cloudflare:
An A or AAAA record for your mail subdomain that points to the IP address of your mail server.
TypeNameIPv4 AddressProxy StatusAmail192.0.2.1Proxied
An MX record that points to that subdomain.
TypeNameMail ServerTTLMX@mail.example.comAuto
Configure Email Security Records
To configure email security records for your domain:
- Navigate to the DNS section within Cloudflare.
- Click Configure under Email Security.
- If your domain sends email, configure SPF, DKIM, and DMARC records using the available options.
- If your domain does not send email, use the "Your domain is not used to send email" section to set up restrictive email records.
Configuring email security records protects your domain from spam and phishing, and helps ensure your emails are delivered and recognised as genuine.
With your MX and email security records set up correctly in Cloudflare, your emails will be delivered securely and reliably. You'll also protect your domain from anyone trying to spoof your email addresses, keeping your communications trustworthy.