Windows 10 Tip: How To Block a Website without 3rd Party Software

0

Browsers don’t seem to have a built-in junk list to block those nasty and unwanted websites out of the box without the help of extensions. If you need to block certain websites on the whole computer regardless of which browser to use and don’t want to utilize any browser extensions, here is a trick for you.

Well, have to admit, the trick is nothing new and has been around since Windows 9x times but is still quite effective. It’s the hosts file we are going to tweak to block the sites you don’t want to get access by altering the DNS naming resolution.

The hosts file is responsible for correctly translating a host name or domain name to a specific IP address. So, theoretically, if you tell it to point a website to a wrong location you are basically blocking that address from getting accessed. For example, a line like below will completely block Facebook website on your computer.

127.0.0.1 www.facebook.com

Since the file is always located in the following folder in Windows system, you need to navigate to that folder first.

%windir%\system32\drivers\etc

Where is the hosts file - Windows 10 Tip: How To Block a Website without 3rd Party Software

Then, open the hosts file in Notepad and start adding lines in a format mentioned above, one domain per line, like below:

hosts Notepad - Windows 10 Tip: How To Block a Website without 3rd Party Software

Save the file, and done.

You may be prompted by UAC asking for the permission to save the changes. Click Yes to allow the change. Because the hosts file is set as Read-only by default, you may need to manually remove the Read-only attribute as well before you start making any changes to the file.

If you made this far, you may think this process is quite tedious. There is no way for me to go through that just to block one or two websites. That’s where a little time like Hosts Profiles comes handy.

It’s a portable open source tool that makes managing hosts file a lot easier. All you need to do to block a site is, open the tool, add one line, and click Apply & FlushDNS button. You are all set.

Host Profiles Management - Windows 10 Tip: How To Block a Website without 3rd Party Software

SHARE

LEAVE A REPLY

Please enter your comment!
Please enter your name here