How to get the mail server IP address from Microsoft 365 for the A record

Hi, I’m setting up Cloudflare for the first time and I’m having trouble with the support documentation. Setting up the email records, it sais I need both an A record and an MX record. MX record I can find easily from Microsoft, but the A mail IP-Adress of mail server not. I cannot seem to find out what the IP address of our mail servers is. Microsoft 365 support sais they don’t have the A record for our domain , GoDaddy (registrat) don’t have it, our DNS records in WordPress have no such entry. I always though our email is from Microsoft but now I’m super confused and I have no idea how I can get this IP address and prevent major issues with e-mail delivery if I move the name servers to Cloudflare.
Has anyone had similar issues? I mean there must be tons of people who use Microsoft and Clourflare and who have working email. I’m getting desperate as I’m closing a deadline.
Thanks for any help!
Anna

Welcome to the Cloudflare Community. :logodrop:

There will be no mail related A record in your zone when using Microsoft 365 email. If the guide you are reading mentions an A record related to mail, it was not written for Microsoft 365 email setup, and you can ignore that part.

When you set up your DKIM records, be sure to make them :grey: DNS Only. Any email related CNAMEs should be :grey: DNS Only.

Thank you so much epic.network! I wish the Cloudflare chat agent could have told me that instead of insisting that I need the A record for mail :,) I’ve been looking for this information all day. You saved me.

1 Like

You would need an A record for mail if your MX used a hostname in your domain.

e.g. an MX for the example.com domain that contained a hostname of mail.example.com would need an A record for mail.example.com

Since the MX used with Microsoft 365 consists of hostnames in Microsoft domains, they need to publish the corresponding A records in their DNS.

Happy to have helped.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.