The location of the hosts file depends on your operation system.
- Windows XP, Vista and Windows 7 C:\WINDOWS\system32\drivers\etc\hosts
- Windows 2000 C:\WINNT\system32\drivers\etc\hosts
Note! Make a backup of the hosts file and put it somewhere safe, in case you mess up.
- Open the hosts file using Notepad or other plain text editor.
- Find the line 127.0.0.1 localhost
- To block, for example, the website facebook.com, add this text under 127.0.0.1 localhost:
- Save and close the Hosts file.
- Reboot your computer to apply the changes (If required).
- Try to open www.facebook.com into a browser.