Can Cloudflare Firewall Rules be Used to Validate a Domain?

I’m trying to figure out if it’s possible to use firewall rules to validate that a domain exists and has MX records. I couldn’t really tell how intertwined Cloudflare was with Wireshark or what options were available.

Example URL: https://example.com/?domain=testing.com&apikey=12345

Could something like dns.mx.mail_exchange be used to detect if testing.com has any MX records set? I don’t need to know what the records are, just that they exist.

If that’s not possible, could dns.a or dns.afsdb.hostname or something similar be used to verify if the domain exists and resolves? Don’t need the content of the website or any DNS details, just to know that it actually resolves and is therefore a valid domain.

I’m guessing similar can be done with Workers as well - which I am planning on doing. I’m just trying to decrease the amount of invalid traffic coming into workers so it doesn’t end up with a huge bill.

This topic was automatically closed after 30 days. New replies are no longer allowed.