
Let’s consider, I am going to block youtube.com from my network. which means no one should be able to access youtube.com from my network.
This regular expression will help you to block any of the websites you want.
lets go to IP>Firewall>Layer 7 protocols
/ip firewall layer7-protocol add name="Block_youtube" regexp="^.+(youtube.com).*$"
Step 2 Create the firewall rule to drop the traffic of Youtube.com
/ip firewall filter add action=drop chain=forward disabled=yes dst-port=80,443 layer7-protocol=\ "Block_youtube" protocol=tcp
In the same as you can make the rules of any website and you can write the appropriate regular expression in this way.