With growing concern over the effect of online content on office productivity or young viewers, a number of homes and offices are implementing plans to block certain websites. YouTube, although the site also contains a wealth of high-quality and useful content, is one site often singled out for blocking, due to potentially inappropriate content. While a number of Web browser add-ons and software solutions can be used to block sites, the simplest and most cost-effective way to block a website on a Windows 8 machine is to edit the host file.
Make Host Files Editable
Log into Windows 8 as an administrator and launch the Start Screen.
Video of the Day
Type "Windows Defender" into the search field and click on the application icon.
Click on the "Settings" tab on the right and select Excluded Files and Locations from the menu on the left.
Click on the "Browse" button at the top and navigate to the C:\Windows\System32\Drivers\etc directory. If Windows is installed on a drive other than C:, find the directory on the drive where you installed Windows.
Select the "hosts" file in the "Etc." folder and click on the "OK" button.
Click on the "Add" button in the main Windows Defender screen to exclude the file from Windows Defender protection.
Click on the "Save Changes" button and close Windows Defender.
Launch the Windows Start Screen and type "Notepad" into the search field.
Right-click on the Notepad app and select "Run as Administrator" from the options on the bottom of the screen.
Click on the "File" tab in Notepad and select Open.
Navigate to and open the hosts file from the directory C:\Windows\System32\Drivers\etc.
Scroll to the bottom of the document and type in "127.0.0.1 youtube.com" to block YouTube.
Save the changes to the file and close Notepad.
You can use the same code to block any website. To block Facebook, for example, enter "127.0.0.1 facebook.com" into the bottom of the host document and save your changes.
Any website you block in the file will become inaccessible from all Web browsers on your computer.