How to Block or Allow a WiFi Network in Windows 10

When you click on the network icon on your taskbar to connect to a WiFi network, Windows will show all the Available WiFi networks. This makes it easy to quickly choose a network and connect to it. However, if you have a lot of WiFi networks or access points near you, the network connections pop-up may look pretty cluttered, and you might have to do a lot of scrolling to find the access point you need. In those situations you can configure Windows to allow or block certain networks. This method is also helpful for blocking open WiFi networks that you don’t trust or WiFi networks that use inappropriate or unpleasant names.

Windows doesn’t provide any options in the Settings app or Control Panel, but you can easily block a WiFi network using the Command Prompt. To block a WiFi network, all you need is the network name or SSID. You can get a WiFi network name by looking at the network connections pop-up. (Click on the network icon in the taskbar.) When you block a WiFi network, it will no longer appear in the network connections pop-up, and you won’t be able to connect to it.

To start, search for “Command Prompt” in the Start menu, right-click on it and select the option “Run as Administrator.”

In the command prompt window, execute the below command to block the WiFi network. Replace “WiFi Network Name” with the actual SSID or network name.

As soon as you execute the command, said WiFi network will be added to the blacklist filter, and you will be no longer be able to see or connect to it.

win10-block-wifi

In the future, if you want to allow the WiFi network, all you have to do is to delete the entry from the blacklist. To do that, execute the below command while replacing “WiFi Network Name” with the actual blocked network name.

If you don’t remember the actual name, then use the below command. It will list the names of all the allowed and blocked WiFi networks.

win10-list-filters

Just as you can block select WiFi networks and allow all other networks, you can allow select WiFi networks and block everything else. This kind of whitelisting is useful when you want your system to only connect to the networks you trust.

Just like before, open Command Prompt with admin rights and execute the below command to allow a WiFi network. Replace “WiFi Network Name” with the actual SSID.

win10-allow-wifi

If you have more networks, then repeat the command while replacing the name to add more WiFi networks to the whitelist filter. Once you are done adding, use the below command to block all other not-whitelisted networks.

From this point forward, your system can only see and connect to allowed WiFi networks. If you want to block a previously allowed WiFi network, then all you have to do is delete that specific entry from the allowed list. You can do that by executing the below command.

In the future, if you decide you no longer have the need to whitelist specific networks and block all others, use the below command. It will delete the “deny all” filter and allow all WiFi networks along with the ones in the whitelist.

Comment below sharing your thoughts and experiences regarding using the above method to block or allow WiFi networks in Windows 10.

Image credit: Wireless Router by Sean MacEntee

4 comments

  1. Brilliant tip – thanks!
    Have Googled quite a bit since setting up a new laptop and this is the only method that has actually worked for me.
    Laptop kept connecting to a neighbour’s router with a link to pay-per-day service from their ISP.

    Most other pages (Microsoft included) just said to remove the checkmark form “Connect Automatically” which simply does not work for open networks.

    100% sorted out now. Page saved in favourites for future ref. Thanks again.

  2. Been looking for a solution to this problem for hours now and this is the only solution that worked. Microsoft does not actually have an actual solution that would stop from automatically connecting to all networks listed. My wifi now only stays connected to mine and doesn’t disconnect every 5 min trying to connect to the neighbors. Thank you, you’re the best.

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.

Sponsored Stories