How to Block Specific Domains in Your Hosts File

The way Windows has been set up going back several versions allows users to block individual websites and disallow the computer to connect to them at all. This is usually done by editing the system's "hosts" file. This article will show you how to block your computer from accessing any website you want.

The process is relatively straightforward and simple, but it requires access to an uncommon file in an uncommon location. In order to block a domain or website on your computer, you need to find the Windows "hosts" file. Starting with Windows XP, the "hosts" file has been located in the same directory on your main hard drive. The directory you need is "C:\Windows\System32\drivers\etc\".

Here are the steps you should follow to block a website:

  1. Open your Notepad with administrator privileges. To do that you can type "Notepad" in the start menu to bring up the shortcut, right click it and select "Run as administrator".
  2. While in Notepad, click "File" > "Open". In the menu that comes up, navigate to C:\Windows\System32\drivers\etc\. This location will show up as empty, as the files contained in it have no extensions.
  3. Click the dropdown box above the Open and Cancel buttons and select "All files (*.*)".
  4. Double click the "hosts" file that shows up in the list.
  5. Add a new line below the last line in the file. On it, type 127.0.0.1, add several spaces for better readability and then add the website or domain you want to block. For example, if you want to block your system from being able to access a specific Tumblr page, your new line should look like that:

127.0.0.1     pagename.tumblr.com

  1. Click "File" > "Save" to save your changes and close Notepad.

This is all you need to do to tell your computer to never access the website you added and to create a redirect of all queries to the website in question back to localhost. This effectively means no matter who tries to open the website you just added, using any browser on the system, they will not be able to view the site or even connect to it, due to the redirect.

December 4, 2020
Loading...

Cyclonis Backup Details & Terms

The Free Basic Cyclonis Backup plan gives you 2 GB of cloud storage space with full functionality! No credit card required. Need more storage space? Purchase a larger Cyclonis Backup plan today! To learn more about our policies and pricing, see Terms of Service, Privacy Policy, Discount Terms and Purchase Page. If you wish to uninstall the app, please visit the Uninstallation Instructions page.

Cyclonis Password Manager Details & Terms

FREE Trial: 30-Day One-Time Offer! No credit card required for Free Trial. Full functionality for the length of the Free Trial. (Full functionality after Free Trial requires subscription purchase.) To learn more about our policies and pricing, see EULA, Privacy Policy, Discount Terms and Purchase Page. If you wish to uninstall the app, please visit the Uninstallation Instructions page.