On a Windows PC, we often need to block an app or program from accessing the Internet, especially those hogging the network resources, say a game or program that keeps downloading files in the background.
While the process to restrict Internet access is simple and built-in, many users look for third-party tools for the job. In my opinion, you should avoid third-party software for functionalities that are available natively in Windows. So, let’s get directly to the steps!
How can I block/restrict apps from accessing the Internet in Windows?
1. Via Windows Defender Firewall
The built-in way to block Internet access for apps in Windows involves setting up a new app-specific rule in the Windows Defender Firewall. It’s not as complex as it sounds. Creating a new rule in Windows is fairly straightforward and doesn’t ideally take more than a minute.
To create a new rule to restrict Internet on the app-level:
- Press Windows + S to open Search, type Windows Defender Firewall, and click on the relevant result.
- Select Advanced settings from the left.
- Choose Outbound Rules from the left pane, and then click New Rule on the right.
- Select Program from the list of options and click Next.
- Here, either paste the program’s path in the provided field or click on Browse to manually locate and pick the launcher. I clicked on Browse, found Microsoft Edge’s launcher under Program Files (x86), and clicked on Open. After selecting the program, click Next.
- Now, choose Block the connection and click on Next.
- Tick all three checkboxes, Domain, Private, and Public, and click Next.
- Enter a name for the rule and a description (optional), and click on Finish.
- After creating the rule, restart the computer to fully apply the changes.
At this point, the selected program won’t have access to the Internet in Windows anymore. If you picked a browser, it won’t load any websites, and the online processes that relied on it may stop working.
What if you want to temporarily restore Internet access for the app or program? Simply disable the rule for that duration. And if you ever want to permanently restore Internet connectivity, just delete the rule!

2. Via Command Prompt
Did you know that most of the actions within Windows can be performed using simple commands (often just one), including the ability to block an app from accessing the Internet? You read that right!
If you don’t want to go through the entire process of manually creating and configuring a new rule, you just have to run three simple commands, and Windows will automatically restrict Internet access to the app (using the built-in firewall, of course).
The three commands to be run in an elevated Command Prompt (or Windows Terminal) are:
netsh advfirewall firewall add rule name="FF Block In" protocol=TCP dir=in action=block program="PATH"
netsh advfirewall firewall add rule name="FF Block TCP" protocol=TCP dir=out action=block program="PATH"
netsh advfirewall firewall add rule name="FF Block UDP" protocol=UDP dir=out action=block program="PATH"
In the commands, replace PATH with the path to the program’s launcher. For instance, the path for Microsoft Edge, which we blocked earlier, is: C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
So, using this path, the first command becomes: netsh advfirewall firewall add rule name="FF Block In" protocol=TCP dir=in action=block program="C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"

QUICK TIP: After you locate the program’s launcher (.exe file) in the system drive, right-click on it and select the Copy as path option.

3. Use a third-party tool (not recommended solely for restricting Internet access)
While I never advocate the use of third-party tools for functionalities that come built-in, there are exceptions. For instance, if a network monitoring or security tool already in use allows you to block app(s) from accessing the Internet in Windows, it makes sense to rely on it. This way, all the network configuration can be handled from a single tool, and it will minimize conflicts between the tool and Windows!
A quick Google search and you will find several of these tools. It’s important to pick a reliable and actively updated software. And the best option, in my opinion, is a third-party antivirus that allows blocking apps from accessing the Internet.
Those are all the ways you can block an app from accessing the Internet in Windows or temporarily restrict connectivity. It’s simple, quick, and pretty straightforward. And the best part, you can set up as many rules, i.e., block as many apps as you want.
Before you leave, discover expert tips to increase the Internet speed in Windows and enjoy faster downloads and uploads!
For any queries or to share how you restrict Internet access for apps in Windows, drop a comment below.

With over five years of experience in the tech industry, Kazim excels at simplifying complex topics, making them accessible to tech enthusiasts and general readers alike. He has contributed to several renowned publications worldwide, including WindowsReport and Allthings.how, bringing insightful coverage of key developments in the field.
Kazim has extensively covered the Windows ecosystem, from the early days of Windows 7 to Windows 11. Unlike many in the field, he’s optimistic about Windows 11, calling it the most user-oriented iteration to date.
When he’s not writing, you’ll find Kazim planning weekend getaways or diving into tech verticals beyond his expertise.