Log in

View Full Version : How can I use windows to block domain?



james438
01-04-2020, 05:18 AM
If I go to C:\Windows\System32\drivers\etc\hosts and add the following line I can block a website:

127.0.0.1 example.com

This is handy, but I am unaware of how I can use this trick or any other trick to block https sites. Is anyone aware of a way I can use Windows to block a https website?

For example, if the website is https://www.example.com the either of the following should work:

127.0.0.1 example.com
127.0.0.1 1.2.3.4 #where 1.2.3.4 is the ip address of the website.

For some reason this only seems to work with http websites. :/

keyboard
01-04-2020, 12:54 PM
It should redirect regardless of http/https.
It works off hostname (e.g. google.com vs https://google.com)