You can block sites in squid's squid.conf file. If you know the domain that you want to block, you can create an access control list (acl) entry for it and then deny access to that acl. For example:
Code:
acl doubleclick dstdomain .doubleclick.net
http_access deny doubleclick
If you don't know the full name of the domain, but you know it contains a particular pattern (e.g. sex) you can block it with a regular expression:
Code:
acl blocksex dstdom_regex -i sex
http_access deny blocksex
It's important where you put these lines in the file - search for
TAG: acl and
TAG: http_access and follow the suggestions in the default file for securing access to your proxy.