How to block a website in Windows 10 without third-party apps

Are you trying to purge yourself from your favorite social media networks so you can finally get some work done? Or maybe you just have some annoying site you want to make sure you never visit again. Regardless of the reason, you can easily block a website in Windows 10 without third-party apps.

You could also use the method described below as a basic parental control system, to prevent your kids from accessing specific sites. Windows 10 give us everything we need to block any URL and while it’s a simple process, it does imply doing a bit more than just pushing a button.

To┬áblock a website in Windows 10 without third-party apps we will rely on the hosts file. It’s a simple file, but one that’s extremely important for your computer’s Internet communication. The hosts file enables us to do things such as block and redirect websites but we’ll focus on the first part for the purpose of this guide.

How to block a website in Windows 10 without third-party apps

To begin with, go to C:\Windows\System32\Drivers\etc\ (where C is the system drive but yours might have a different letter).

Now you’ll need to create a backup of your hosts file just to stay on the safe side. Just copy and paste the file to a different location.

To continue, right-click on the file, select “Open With” and click on Notepad in the pop-up menu.

The hosts file will open in notepad and you will see multiple entries that start with the numbers All the sites that have this IP address assigned will search for their addresses on your PC, and fail since they’re not stored on your computer. This is how websites are blocked by the hosts file.

As a result, you can block any website by adding a new line to the hosts file that looks like this:

Of course, you can add multiple websites – you just need to start a new line for each.

When you added all the sites you want to block, go to File and click Save then close it. That’s it!

If you ever want to unblock any of the sites, just open the hosts file again and remove their line from it or replace it with the backup you created earlier.