Hello @soly,
Please search the forum, there is existing information on how to block domains already, here is some of the existing threads to get you started:
- From @spoiler How to config Firewall Access Rule ? Block All but Allow Something for Website with facebook and youtube on page
- From @TK_Liew & @Rexymav "facebook blocking" - #28 by TK_Liew
- From @Alan Use Peplink’s Firewall Feature to Block YouTube
- From @MartinLangmaid BalanceOne - Block Youtube Not Google Drive - #4 by MartinLangmaid
You could also if you want for Facebook attempt to enter all of known server IPs, most of these are listed here at AS32934 Facebook, Inc. details - IPinfo.io
Consider why you are attempting to block these domains, you may find educating the end user(s) a better option.
Happy to Help,
Marcus