How to block Netflix on Windows

There are some situations when you need to block Netflix on some of your company computers but not on all of them. In this case you cannot block Netflix at network level for all users as you have to do it individually for some computers only.

If you don’t have a dedicated security or firewall solution to handle the job on selected computers only, then you have to block Netflix using Windows OS built in features.

On Windows OS you can use firewall outbound rules to block a websites by IP but this is not always a good solution as websites can change IP address all the time.

Block Netflix using hosts files in Windows

The best way to block Netflix on a computer that runs Windows OS is to edit the host file to point the domain to localhost, that way, the specified domain becomes unavailable when you access it in browser.

The hosts file in Windows is located in C:\Windows\System32\drivers\etc. To edit the hosts files in Windows you need to use an administrator account. Go to This PC > Local Disk C > Windows > System32 > divers > etc folder and select the hosts file. Right click on it, select open with and choose Notepad. If you have administrator rights, you should be able to edit the file. If you are on a limited account on a domain network, you can open Notepad as administrator, click on File > Open and navigate to etc folder to open hosts file.

Edit the hosts file to block Netflix website by adding these lines:

127.0.0.1   netflix.com
127.0.0.1   www.netflix.com
127.0.0.1   https://www.netflix.com
127.0.0.1   https://netflix.com

In the end, the hosts file should look like this:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97    rhino.acme.com        # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1                  localhost
	127.0.0.1       netflix.com
	127.0.0.1       www.netflix.com
	127.0.0.1       https://www.netflix.com
	127.0.0.1       https://netflix.com
hosts file Windows
editing hosts file in Windows with Notepad

This method is used to block Netflix on computers with Windows OS and needs to be applied on every PC that you have to block Netflix. After the hosts file is edited to block Netflix, the changes should be applied right away. If you still can access Netflix website after you already modified the hosts file, try to do the following:

  • flush DNS cache using this CMD command: ipconfig /flushdns
  • clear browser cache
  • restart the computer

By applying those mentioned above, Netflix website can no longer be accessed from any browser.