Windows Firewall gives you a simple way to block any website URL or IP address. Here’re the exact steps you should follow to do so.
Just like any other operating system, Windows 10 doesn’t block any website. As long as you have a browser, you can access any website you want without any restrictions whatsoever. However, there might be times when you need to block a specific website, URL, or IP address. For example, if you want to block a specific social media site or some such, you can use the built-in Windows Firewall to block it. You don’t have to use any third-party blocking software. This is especially useful for family PC where it is common to share the computer with children.
So, without further ado, let me show you the steps to block a website URL or an IP address in Windows Firewall.
Steps to Block Website or IP Address with Windows Firewall
To block a website with Windows Firewall, you need to know its IP address(s). This is because Windows requires an IP address and doesn’t directly support the URLs. If you already have an IP address, follow the steps from the second section.
Find the IP Address of a Website
The first thing we need to do is find the IP address of a website. Thankfully, Windows has a built-in command called NSLookup that gives you the IP address of any website. There are the steps you should follow.
- First, open the Command Prompt window. You can search for it in the Start menu.
- After opening the CMD window, execute the below command. Replace “example.com” with the actual website address you want to block.
nslookup example.com
- You will see the IP addresses next to “Addresses”.
- Depending on the website, the command might show multiple IP addresses. In my case, I got 2 IP addresses for example.com.
- To make things easier, I recommend you note down those IP addresses in a text file.
Once you have the IP addresses, follow the next section to block the IP address in Windows Firewall.
Block IP Address in Windows Firewall
- Open the Start menu.
- Search and open “Windows Defender Firewall” in the Start menu.
- Click on the “Advanced Settings” link on the left panel.
- Right-click on the “Outbound Rules” option on the left panel.
- Select the “New Rules” option.
- Choose the “Custom” option and click “Next“.
- Select the “All Programs” option and click “Next“.
- Select “Any” from the “Protocol type” dropdown menu.
- Click “Next” to continue.
- Select the “These IP addresses” option under the “Remote IP Addresses” section.
- Click the “Add” button under the same section.
- Select the “This IP address or subnet” option.
- Type the IP address in the field and click “Ok“.
- If you have multiple IP addresses, follow steps 11 through 13 to add them. In my case, I added two IP addresses.
- After adding the IP addresses, click “Next” to continue.
- Here, select the “Block the connection” option and click “Next“.
- Now, select all the checkboxes and click “Next“.
- Name the rule however you want.
- Click “Finish“.
- You can see the newly added rule in the main window.
From now on, Windows Firewall will block the IP Addresses and the website in Windows 10 according to the configured rule. If anyone tries to access the blocked website or IP addresses, they will be greeted with “Your Internet access is blocked” or “Windows Firewall is blocking the IP address/website” message.
If you want to unblock the website or IP address in Windows Firewall, follow steps 1 through 3 in section two, find the specific rule, right-click on it, and select the “Disable Rule” option. When needed, you can also delete the rule by selecting the “Delete” option.
That is all. I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible. If you like this article, check out how to block all outgoing connections in the Windows firewall.
thank you for your tutorials… It is very helpful to me…
Have a nice day!
i want to block a specific website but i can’t. i tried this one but still not working…
Sometimes, websites might have multiple IP addresses. In that case, you might have to list all those IP addresses. Moreover, you also have to clear the DNS cache in Windows and your browser. You can use the “ipconfig /flushdns” command to clear the Windows DNS cache.
does the description need to add the link of the website