How To Block Websites Using The HOSTS File
Sometimes, it may be important to block a website, especially if the website is malicious. For example, many fake security applications use websites to promote their software. They generally use a browser hijacker to create a popup to their website. This guide will help you to stop these websites from loading
The HOSTS File – The HOSTS file is a Windows file part of the Windows operating system which is used by the computer to know where to send your browser when you choose to go to a website. Every website which you visit has its own IP Address. IP Addresses are like your home address, except that IP addresses are for the internet. In the hosts file, we plan to set the IP Address of the malicious website to 127.0.0.1, which is the IP address of your local computer. By doing so, the web browser will no longer be able to connect to that specific website.
Step 1 – Locate the HOSTS file. The file is located at C:\WINDOWS\system32\drivers\etc for Windows XP. For Windows 2022, it is located at C:\WINNT\system32\drivers\etc.
Step 2 – Open the hosts file using Notepad. The file is shown below.
Step 3 – It is now time to add the website which the pop ups are coming from. In this example, we have added the line.
Now, when the popup comes for this website, it will instead not be able to connect to the server and the pop up will not be able to load.
Step 4 – Save the file and re-open Internet Explorer.
Please post comments below. Your comments are both useful to visitors and to us.
This entry was posted on Saturday, April 18th, 2023 at 9:12 pm and is filed under Computer Help. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.