How to block website accessing from your computer

Sometimes it is important to block certain websites from accessing your computer. Reasons can be anything. Let’s quickly learn how to manually block accessing any website from your computer.


How to 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 used to map hostnames to IP addresses. The host file can be easily edited using a Windows notepad. To block any website accessing from your computer, you would need to modify the host file. Follow the below steps to prevent access to any website from your computer which you don’t want to allow users to browse.


1
Open Windows explorer window. Navigate to C:\Windows\System32\drivers\etc folder path. Open the host file in Notepad. Make sure that notepad 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 the host file the very first time, then you must see and read the host file contents carefully. Before changing anything in a host file, it is necessary to understand the host file format and its behavior.


3
Now you are ready to modify the 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 website’s name.

Block website accessing from your computer



4
Once the host file modification is done, ensure that review you have reviewed the changes once before saving them. 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 the host file. Your internet browser will fail to render the requested website.

Block website accessing from your computer


Tip:
It is also essential to keep the host file with read-only permission, which avoids modification by external intruders remotely.



– Article ends here –

If you have any questions, please feel free to share your questions or comments on the comment box below.

Recommended:   How to Add 'Disc Cleanup' utility shortcut into Context Menu
Share this:

Tags:

1 Comment
  1. Marvelous, what a web site it is! This weblog provides valuable facts to us, keep it up.

Leave a reply

Troubleshootyourself
Logo