- dotTech - http://dottech.org -
How to block websites in Windows 8 using the HOSTS file — be sure to disable Windows Defender first [Guide]
Posted By Ashraf On August 19, 2012 @ 6:01 PM In Windows | 9 Comments
Using Windows’ HOSTS file is a quick and painless way to block websites (such as Facebook, ad networks, or malicious websites) on your machine. In the past blocking websites using the HOSTS file was (is) as easy as editing the HOSTS file and adding the websites/servers you want to block. In Windows 8, however, it is a bit different. You see one of the many changes Microsoft  has made in Windows 8  is introducing a native anti-virus/anti-malware security program. Called Windows  Defender (it is essentially Microsoft Security Essentials), one of the things this security program does is protect the HOSTS file from modification. For most users this protection by Windows Defender is a good thing; it prevents malware from hijacking your HOSTS file without your knowledge. For users that want to modify the HOSTS file, however, this is a roadblock in blocking websites with the HOSTS file. If you are confused on how to block websites/servers in Windows 8 with the HOSTS file, this guide is here to help. (The following method works for Windows 8 desktops, laptops, and tablets.)
One of the ways to turn off Windows Defender’s protection of the HOSTS file, and thus allow you to edit it, is by disabling Windows Defender altogether. However, for 99.99% of Windows users there is no reason to disable Windows Defender; Windows Defender provides basic, much-needed native protection to Windows 8. If you want to disable Windows Defender so you can use a different security program, such as avast! or Avira or AVG, don’t bother — Windows Defender automatically disables itself when it detects a third-party security solution is installed. Therefore, the solution to the Windows-Defender-is-blocking-access-to-HOSTS-file problem is not disabling Windows Defender but rather adding the HOSTS file to the exclusion list in Windows Defender.
To exclude the HOSTS file from Windows Defender protection, do the following:
Once you have done what is described above, you have successfully disabled Windows Defender’s protection of Window 8′s HOSTS file. Proceed to the next step in this guide to learn how to edit the HOSTS files to block websites.
Once you disable Windows Defender protection, editing the HOSTS file on Windows 8 is the same as on previous versions of Windows. Do the following:
Add whatever you want to block at the end of the HOSTS file in the format of 127.0.0.1 [website URL]. For example, if you want to block Facebook you would add “127.0.0.1 facebook.com” (without the quotes):
Add as many websites, servers, ad networks, etc. that you want to block.
If you don’t want to manually add thousands of websites to block, there is a very popular HOSTS file block list maintained by MVPS that you can copy and paste into your HOSTS file to block ads and known malicious websites. To use MVPS’s host file as your own, go to http://winhelp2002.mvps.org/hosts.txt  and copy all the text starting from “# [Start of entries generated by WinHelp2002]” and ending at “# [end of entries generated by WinHelp2002]“. Then paste it at the end of your computer’s/tablet’s HOSTS file and save it.
Using the HOSTS file to block websites is one of the best ways to block websites, servers, ads, etc. in Windows. Yes it does take some work as opposed to using something like an ad blocker in your browser  but its native nature (i.e. it is a built-in Windows feature) makes it extremely desirable. Stay safe and enjoy!
Article printed from dotTech: http://dottech.org
URL to article: http://dottech.org/76665/how-to-block-websites-in-windows-8-using-the-hosts-file-be-sure-to-disable-windows-defender-first/
URLs in this post:
 Microsoft: http://dottech.org/tag/microsoft
 Windows 8: http://dottech.org/tag/windows-8
 Windows: http://dottech.org/category/windows
 how to quickly find files and launch programs/apps on Windows 8: http://dottech.org/windows/76706/how-to-quickly-run-programs-apps-find-files-on-windows-8/
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_165357.png
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_165453.png
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_165906.png
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_173237.png
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_173430.png
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_173529.png
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_173728.png
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_174037.png
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_174301.png
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_171423.png
 Image: http://dottech.org/wp-content/uploads/2012/08/2012-08-19_171802.png
 Restart your computer or tablet: http://dottech.org/windows/76686/how-to-shut-down-or-restart-windows-8-guide/
 http://winhelp2002.mvps.org/hosts.txt: http://winhelp2002.mvps.org/hosts.txt
 ad blocker in your browser: http://dottech.org/tipsntricks/17516/block-ads-in-firefox-internet-explorer-chrome-and-opera-how-to/
© 2008-2012 dotTech.org | All content is the property of its rightful owner.