It seems that you can block websites using the hosts file on a PC. So, how do you block a website on an Apple computer running macOS? Here is the specific method, courtesy of macfans.