How do I block a website on my Firewall?

If you’re managing a multi user system and you do not want to access users a specific website, this article is for you. Though, there is no direct setting to configure this. But in Windows 10, you can simply use Windows Defender Firewall to block a website.

All you need is the website IP address. Each website have its own IP address to which its server is pointed. You can get this IP address by pinging the website. Once you got the IP address, you’ve to create an Outbound Rule with Windows Defender Firewall, blocking that IP address and you’re done.

Here are the steps you need to perform.

Block A Website In Windows 10 Using Firewall

We’re illustrating this method by blocking twitter.com. You can apply it to any website.

1. Open Command Prompt. Type ping domain.tld and press enter key. Replace domain.tld with the website address you want to block.

How do I block a website on my Firewall?

2. Notice the IP address of the website in command execution. We’ll be using this IP address to block the website.

3. Go to Control Panel > Windows Defender Firewall > Advanced Settings.

4. In Windows Defender Firewall with Advanced Security, right click on Outbound Rules and select New Rule.

How do I block a website on my Firewall?

5. In New Outbound Rule Wizard window, select Rule type as Custom and hit Next.

How do I block a website on my Firewall?

6. Then for Program section, select All programs. For Protocol and Ports, select default settings and move on.

7. Under Scope section, select These IP addresses and click Add. Type the IP address we got in step 2 and click OK. Click Next.

How do I block a website on my Firewall?

8. In the Action section, select Block the connection, hit Next.

How do I block a website on my Firewall?

9. Finish the rest of section with default and complete the wizard and reboot the system.

After rebooting the system, the website (you wanted to) should be blocked from access.

If you want to unblock the website later, simply delete the outbound rule.

You can also block website using hosts file, check out this video:

That’s it!

Related: Disable Windows Defender Firewall In Windows 10.

READ THESE ARTICLES NEXT

  • Enable or disable Windows Defender Firewall notifications
  • Using Windows Firewall Troubleshooter In Windows 10/8/7
  • [How To] Disable Windows Defender Firewall In Windows 10
  • [How To] Configure Windows Defender Firewall In Windows 10
  • [FIX] ‘Windows Firewall Has Blocked Some Features Of This App’ In Windows 10
  • [FIX] Windows Could Not Start The Windows Firewall On Local Computer
  • [FIX] Windows Firewall Can’t Change Some Of Your Settings. Error Code: 0x80070424
  • [FIX] Windows Firewall Can’t Change Some Of Your Settings (0x80070424)

Possibly, depending on which version of Windows you're using, although I don't recall ever seeing any such options.

It's probably easier to just add entries into your C:/WINDOWS/SYSTEM32/DRIVERS/ETC/HOSTS file (it's a plain ASCII text file that you can edit directly with Windows Notepad), like so:

127.0.0.1 www.bad-web-site.example.com
127.0.0.1 www.another-site.example.net

The IP address "127.0.0.1" is localhost (your local computer), and using it for the web site addresses (the domain names) you wish to block will result in a timeout (assuming you're not running a local web server like Apache HTTPd; if you are, then its web page will appear which will be fine anyway).

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.bad-web-site.example.com bad-web-site.example.com
127.0.0.1 www.another-site.example.net another-site.example.net

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

How To Article

Note: In Windows Vista or Windows 7 you must open Notepad.exe as an Administrator to be able to edit and save changes to the hosts file. Right click on notepad.exe or its shortcut and select "run as Administrator" once Notepad is open use File > Open to navigate to the hosts file.

Can firewall be used to block websites?

Firewalls with added DNS-based internet restriction capabilities can block websites as well, but they can only block the entire website – not specific URLs. When a user types in “YouTube.com”, their browser will make a DNS query to get the IP address of the website.

How do I block certain websites on my computer?

How to Block Any Website On Your Android Phone.
Install ES File Explorer. ... .
In this folder, you'll see the file named hosts - tap it and in the pop up menu, tap text. ... .
Tap the edit button in the top bar..
Now, you're editing the file, and to block sites, you want to redirect their DNS. ... .
Reboot your Android device..

How do I selectively block a website?

How to block websites on Chrome mobile.
Open Settings > Screen Time..
Go to Content & Privacy Restrictions and select Content Restrictions..
Select Limit Adult Websites under Web Content..
Tap Add Website and add web addresses of the sites you want to block..

How do I block certain websites on Windows 10?

Block websites through Microsoft's website.
In a web browser, go to family.microsoft.com and sign in with your adult Microsoft account..
Find your child's account on the "Your family" page. ... .
In the section labeled "Web browsing," turn on "Block inappropriate websites" by sliding the switch to the right..