HeadlinesBriefing favicon HeadlinesBriefing.com

Cloudflare MX IP Leak Audit Guide

DEV Community •
×

Your mail server's IP can inadvertently expose your website's true origin, even when using Cloudflare. This happens because Cloudflare doesn't proxy SMTP email, so your MX records must point to a publicly reachable IP. If you host mail and web on the same server, that IP becomes a known entry point.

The audit involves four steps: finding your MX hostnames, confirming their IP addresses across resolvers, running WHOIS to identify the network owner, and checking for blacklists. This reveals whether your origin is hidden or exposed. For most shared hosting setups like cPanel, the IP is the same for both services.

If you confirm the leak, you have options. The cleanest fix is moving mail to a dedicated provider like Google Workspace or a separate VPS. If you must keep mail on the same server, harden it by firewalling the origin to only Cloudflare IPs and locking down admin panels. Good DNS hygiene prevents other subdomains from leaking your origin.