In this feature, you will learn how to block websites on Windows 10 using a host file with a command prompt or CMD. A website is a collection of related network web resources such as web pages and multimedia content that are typically identified with a common domain name and published on at least one web server. You may need to block those websites occasionally.
However, When it comes to blocking websites on Windows 10, there are a number of ways to do that. Mostly, you can search them through your tabs, so you can remove them from the browser you’re using. Also, our systems have a host file that you can use to block any site you want by editing it and putting the web address in it.
Why Block a Website on Windows?
It’s simple to become lost in the never-ending sea of websites and online information in the modern digital world. The internet provides a plethora of pleasure and information, but it can also be a significant source of distraction. You can take back control of your online experience and stop time-wasting habits by blocking websites on Windows 10.
For students who need to maintain concentration while studying or working on projects, blocking websites might be very helpful. Professionals who seek to increase their productivity and reduce distractions while working may also find it useful.
In order to protect their kids from unsuitable information and excessive online time, parents may use website blocking as a tool to establish a secure and regulated digital environment for them.
How to Block Websites on Windows 10 Using Host File
Want to block all users of a Windows PC from opening certain websites, regardless of the browser they use or the time of day? You need only make a few simple additions to the Windows hosts file. This is the easiest method to block websites on Windows 10 and it’s free and doesn’t require to download and install any additional software or extensions. It’s an easy way to restrict people of all ages from seeing content that you don’t want to see.
Step 1. Type Cmd in the search bar next to the start menu. Then right-click on Command Prompt and select Run as administrator.
Step 2. If you’re prompted, click yes.
Step 3. Now, type “notepad c:\WINDOWS\system32\drivers\etc\hosts” without the quotes in the command line window then press enter.
Step 4. Scroll to the end of the text file in Notepad. Type 127.0.0.1 followed by a space then the name of the website you want to block. For instance, 127.0.0.1 www.facebook.com. Repeat this step for each website you want to block.
Step 5. After adding websites to the block list, click “File” in the Notepad menu bar and then “Save” to save to the file when you are finished adding each website. Then close Command Prompt and Notepad.
As you can see that particular website is blocked on Windows 10.
How to Unblock Websites on Windows 10 using Host File
So by now, you have learned how to block websites on Windows 10 with a command prompt. But sometimes, you may want to unblock those blocked websites again. To unblock websites on Windows 10, simply follow the below steps.
- Type Cmd in the search bar next to the start menu. Then right-click on Command Prompt and select Run as administrator. If you’re prompted, click Yes.
- Now, type “notepad c:\WINDOWS\system32\drivers\etc\hosts” without the quotes in the command line window then press enter.
- Delete or remove the blocked website that you have added.
- After deleting the website/websites from the list, click “File” in the Notepad menu bar and then “Save” to save to the file when you are finished adding each website. Then close Command Prompt and Notepad.
This was all about how to block websites on Windows using a host file with a command prompt. This was the easiest and free method to block websites on Windows 10 and it doesn’t require any additional software or extensions.
Read next
1 comment
Doesn’t work