Home > How to guide > How to block website accessing from your computer

How to block website accessing from your computer


Sometimes it is important to block websites accessing from your computer. Reasons can be anything. Instead of discussing about reasons, let’s quickly learn how to manually block accessing any website from your computer.

Block website accessing from your computer:

Platform: Windows
In windows, there is a special file called hosts which is located under C:\Windows\System32\drivers\etc. The Hosts file in Windows 10 / 8 / 7 is a plain text file is used to map host names to IP addresses. The host file is smaller in size about few kilobytes and can be easily edit using Windows notepad. In order to block any website accessing from your computer you would need to modify the host file. Follow the below steps to block access any website from your computer which you don’t want to allow users to browse it.

1 Open Windows explorer window. Navigate to C:\Windows\System32\drivers\etc folder path. Open the host file in Notepad. Make sure that note pad opened in administrator mode. Otherwise you will not be able to open or edit the host file.  Once you open host file on the notepad, the host file looks like as below by default.
Block website accessing from your computer
2 If you are modifying host file very first time then you must see and read the host file contents carefully. Before modify anything in host file, it is necessary to understand the host file format and its behavior.
3 Now you are ready to modify host file to block any website accessing from your computer. To do this, you need to enter the localhost IP address 127.0.0.1 followed by the name of the website.
Block website accessing from your computer


4 Once the host file modification is done, make sure that review you have reviewed the changes once before saving it. Save the host file.
Block website accessing from your computer
5 Now, try to access the website www.troubleshootyourself.com which is blocked access in host file. Your internet browser will fail to render the requested website.
Block website accessing from your computer

Tip:
It is also important to keep host file with readonly permission. This will avoid modification by external intruder remotely.

– Article ends here –

Related Tags:

Share this: