To set up email routing in Cloudflare, follow these steps:
-
Log in to your Cloudflare account.
-
Select the domain for which you want to set up email routing.
-
Click on the "DNS" tab.
-
Scroll down to the "MX" section.
-
Click on the "Add Record" button.
-
In the "Name" field, enter the subdomain for the MX record (e.g. "mail" for "mail.example.com"). Leave the "Name" field blank if you want to set up the MX record for the root domain (e.g. "example.com").
-
In the "Type" field, select "MX" from the dropdown menu.
-
In the "Value" field, enter the mail server hostname or IP address provided by your email service provider.
-
In the "Priority" field, enter the priority value for the MX record (usually 10 or 20).
-
Click on the "Add Record" button to save the MX record.
That's it! You should now have an MX record set up in Cloudflare for email routing. It may take some time for the MX record to propagate and become active. You can verify the MX record by using a DNS lookup tool, such as the "dig" command or the "nslookup" command.
Note: You may also need to set up other DNS records for email routing, such as SPF and DKIM records. Consult your email service provider for more information on the required DNS records and their values.