If you need to block access to certain websites for your users you can do this by defining them in your Squid.conf file as follows:
Using the nano editor do a search for the text TAG: http_access.
Let’s say for example we want to block facebook.com and youtube.com.
Add a new new line above the text TAG: http_access as below and add the following lines.
acl block_websites dstdomain .facebook.com .youtube.com
http_access deny block_websites
Save the config by pressing Ctrl + O and then Ctrl + X to close the config and restart the Squid service with the following command