Firewall and DNS issue

Hi,
I need to block all traffic from a network, with the exception of web traffic to a particular site (I have only hostname, but the ip is variable, since it uses Cloudflare).
How can I manage this situation?
I’m using RB 750 with routerOS 5
thankyou!

If it’s clear HTTP, you can do this with a Layer-7 filter rule.

Add firewall filters to allow DNS requests (UDP & TCP), add another rule to allow your URL, and finally add a rule to block everything else.

Another way to do this, is to use the Hotspot service and configure a walled garden allowing your URL. Not sure if this allows for an HTTPS connection or not.