Published March 16, 2018 by

Blocking websites with Windows Firewall

If we do not want to access any website there is an easy solution which we practice every day that we do not visit there but what about our children who don’t know much about right and wrong, so there is an inbuilt tool of Microsoft Windows called Windows Firewall, you can change windows firewall settings if desired.

So, first of all, Go to Command Prompt and ping URL to get the IP address of that website:

ping abcd.com

Here, note down IP address of abcd.com

Go to Control Panel > Windows FireWall >Advanced Setting>Outbound Rule>New Rule'



  • in new, OutBound Rule Wizard select Custom and click Next
  • in Program Screen Select All Program And click Next
  • in protocol and ports Leave default Setting and click Next
  • in Scope Screen Under Which remote IP address Does This rule apply to? select These IP address and click Add Button
  • in IP Address Dialog under This IP address or subnet: enter the IP address of a website and click ok and then click next 

  • in Action screen select Block the connection and click next
  • in Profile, screen leave all 3 checkboxes selected and click next
  • in Name Screen choose a name for the rule and click Finish
Now, test what you do by enter URL in any browser that you want.


But above solution works only on static IP based websites. That not work on dynamic IP websites like goole.com, drive.google.com, dropbox.com, skype.com, etc...

In this scenario, we can do one thing add the domain name in windows host file.

It is probably easier to just add entries to your C:/Windows/System32/drivers/etc/hosts file (you can edit directly with Notepad), like so:

127.0.0.1              www.abcd.com
127.0.0.1              www.xyz.com

The IP address "127.0.0.1" is localhost (your local computer), and using it for the website addresses (the domain names) you wish to block will result in a timeout.

Make sure that you block both with and without the "www" portion; this is quite easy as you can specify multiple sites on a single line by delimiting them with spaces, like so:

127.0.0.1              www.abcd.com abcd.com
127.0.0.1              www.xyz.com xyz.com

Also, note that the domains are added without any protocol, so without http:// and https://

Now, test what you do by enter URL in any browser that you want.