Last Updated on November 16, 2021 by Tech Queries Team
In this article, we will teach you How to Block Websites on Windows 10 using Command Prompt? The Internet is good as long as you use it for good things like learning, finding information, shopping online, etc. However, there are several other things that can be harmful to users.
If you are a parent and your children have a personal computer, you should prevent them from going into the dark zone of the internet. Even in the office, many employees are addicted to social media, and they use it during working hours.
You can either keep an eye on their activities by using Keylogger software or prevent them from using certain websites. There are several ways of blocking websites on our Windows 10 PC. You can block websites using the Windows Firewall, Third-Party Firewall, or Antivirus software with Internet Security. Moreover, you can even block websites on specific Browsers using extensions/plugins.
However, your child or the employees could easily figure it out, and unblock the sites from the blocked list. Therefore, we are going to use a technical method to block websites, so that they cannot be easily unblocked.
In this article, we will teach you How to Block Websites on Windows 10 using Command Prompt.
Table of Contents
How to Block Websites on Windows 10 using Command Prompt:
- Launch the command prompt window. (You can open it through the search menu or using the command cmd in Run (Windows + R)
- Once you open the Command Prompt, type “notepad C:/Windows/System32/drivers/etc/hosts” (without the exclamation marks) and hit Enter.
- It will open up the Notepad, in which you need to search for the command/line 127.0.0.1 localhost
- You need to add a line below that. Type 127.0.0.1 (space) followed by the website URL you want to block. Example: 127.0.0.1 (ExampleWebsite.com)
- Finally, save the file and close both the Notepad and Command Prompt windows.
Similarly, you can keep adding multiple websites one after another.
Conclusion:
You can prevent your kids from using websites that contain adult content, gambling, and other inappropriate activities. It can also be useful in offices, as you can prevent your employees from wasting their time on social media websites during working hours. Moreover, you can block any website that you don’t want other users to use.
Comment below and let us know whether this article on How to Block Websites on Windows 10 using Command Prompt helped you.