How to block a website using Windows hosts file?

!Hosts file in Windows is a special file which helps resolving DNS records.

For example, you can make your PC resolve a domain to a localhost (127.0.0.1) address.

Follow the steps below if want to block desired website using hosts file.

To block a website using Windows hosts file, just follow the next steps:

  1. At first run the Notepad app as administrator, by choosing Run as Administrator after right mouse clicking.
  2. In Notepad, click the menu File - Open, then navigate to C:\Windows\System32\drivers\etc folder and open file hosts with double-click. To be able to see the hosts file you will need to select All files in drop-down menu.
  3. To block the desired site, just add the line as shown below. By the way, you can use any IP address instead of 127.0.0.1(your local host). This trick is often used by malware, so check the hosts file, if it contains such unknown records.
  4. Finally you have to save hosts file and restart your PC to apply changes you'va made.
Don't hesitate to contact us if you have any questions!

  Ask Question

Read More

Got Something To Say?

Your email address will not be published.