In this tutorial, we will see how to block websites on laptop or PC on all browsers. With this method, you will block websites on Chrome, Firefox, Edge, etc all at once, even if you download and install a brand new web browser the websites you choose will remain blocked. That will save you time by not having to search how to block websites on Firefox, Chrome, and other browsers one by one.
To block a website on your computer, edit the hosts file on Windows and add a website to block by giving a wrong IP address to the website’s domain (0.0.0.0 facebook.com for example)
The simple and handy method used in this tutorial is based on our article about how to Find Where Is The Hosts File in Windows 10 and Edit it. we will see how to use the hosts file in Windows 10 to block websites completely in Windows 10. This will block websites on all browsers (Chrome, Firefox Edge, etc) all at the same time, even on a newly installed browser that may be used to bypass the blocked websites.
What is a host file ?
First of all, the host file is rather a relic of the past. In the early days of the Internet, the file was used to link domain names to certain IP addresses. For example, the host file made sure that the computer could know which IP address was behind www.techlou.com. Therefore, this file contained a long list of these hosts and their special addresses. The influence of the term “host” can still be seen today, especially when we talk about “hosting a website”.Find Where Is The Hosts File in Windows 10 and Edit it.
We can use hosts file to block certain websites like “facebook.com” or “po*nhub.com” on Windows 10 and 7.
How To Block Websites On Laptop in Windows 10 using hosts file.
Follow the steps below to block websites on your laptop in Windows 10 using hosts file.
- Find Notepad in the Start menu and right click on it.
- Select “Run as Administrator”.
- Once in the Notepad, click on “Open” in “File”.
- Open the “host” file in Windows Explorer that you can find in : C:Windows\System32\drivers\etc .
- Select “All files (*.*)” in the filetype dropdown
- Type 0.0.0.0 followed by the website you want to block.
Note: If you open Notepad without administrator privileges you will NOT be able to save the file after edit.
You can now type on the list of websites you want to block on the file, blocking websites works by giving a wrong IP address to the website domain. You can type for example this line “0.0.0.0 facebook.com” to block Facebook on your laptop.