How do I block a website on my computer?
How can I block certain websites on my computer?
In this Blog I will be teaching you how to block websites on computer. This will help you to block selected websites on every browser within few steps.
This can be done by editing the hosts file of your PC and I will guide you to do it perfectly without any hassles.
lets get started.
>> First step is to open the notepad in administrative rights.
- If you are using Windows 8,Windows 10 & Windows 11 machine then come to start screen and type Notepad.
- Here right click on the Notepad then select “Run as Administrator”.
- If you are using other windows versions, navigate to Notepad, right click then select “Run as Administrator” from the list of options.
Your first step is now completed.
>> Second step is to find the path of hosts file.
- To do this, go to notepad then “File” then “Open”.
- Open “This PC” Icon
- Now go to C drive then Windows then System32, then Drivers, then etc.
- Initially you won’t see any files here.
- To get all files, change “Text Documents” to “All Files” and select “hosts”.
- Come to the bottom and add the IP address 127.0.0.1 followed by websites to block.
- For example say, if you would like to block facebook and twitter
- Write down these URLs with a space separation.
- Let me show you in live.
- Both websites are opening before saving hosts file.
after saving the edited hosts file, it shows “This webpage is not available”.
Make sure to add mobile versions of the websites.Facebook.com is treated different to m.facebook.com.
That’s it. If you face any issues do comment below.