It`s a simple way to block website using hosts file. In windows 7 it`s located at "C:\Windows\System32\drivers\etc". Hosts file contain ip address and hostname.
To edit host file you must have administrative privilege.
- Open notepad with administrative privilege. Click on start > All Programs> Accessories. In Accessories right click on notepad and click on "Run As Administrator".
- In Notepad click on File menu and Click on Open..(Ctrl + O). Now browse for host file with above path and open the "hosts" File. You may also drag and drop hosts file on notepad.
Note : Hosts file contain ip address and hostname. Lines starting with d character are commented line and which is ignore by the system.