You can block a website by editing the hosts file and pointing the domain to a IP that does not exist. We will point them to 0.0.0.0
For example, if we want to block facebook.com, first type the following in Terminal,
sudo gedit /etc/hostsNow the hosts file will open.
0.0.0.0 facebook.comNow save the file and you will be unable to access facebook via any browser.