Recommended Posts

You can?t block Facebook using Windows 8?s hosts file

The Windows hosts file offers a great way of blocking or redirecting certain Internet hosts. I?m for instance using it whenever I move websites to a new hosting company to check the life site before the DNS has fully propagated. You can also download software like Hosts Man that allow you to add lists of known malicious sites or advertising servers to the file to block those automatically from being visited on the computer.

In theory, you can add any domain, host or website to the hosts file so that it is blocked on the system. Ghacks reader SGR just informed me that this apparently has changed in the Windows 8 RTM version.

windows-8-hosts-file.png

While you can still add any host you want to the hosts file and map it to an IP, you will notice that some of the mappings will get reset once you open an Internet browser. If you only save, close and re-open the hosts file you will still see the new mappings in the the file, but once you open a web browser, some of them are removed automatically from the hosts file.

Two of the sites that you can?t block using the hosts file are facebook.com and ad.doubleclick.net, the former the most popular social networking site, the second a popular ad serving domain.

The strange thing is that even write protecting the file does not have an effect on it as entries are still removed once you open a web browser. Actually, any kind of Internet connection seems to be enough for that behavior. If you open the Windows Store for instance, the entries get removed as well automatically.

This could be a bug that is affecting only some high profile sites and services, or something that has been added to Windows 8 deliberately. We have contacted Microsoft and are currently waiting for a response from a company representative. Since it is Sunday, it is not likely that this is going to happen today.

It is also in the realm of possibility that the hosts file may not accept other hosts.

Update: Tom just pointed out that turning off Windows Defender, which basically is Microsoft Security Essentials, in Windows 8 will resolve the issue. It appears that the program has been designed to protect some hosts from being added to the Windows hosts file. To turn off Windows Defender press the Windows key, type Windows Defender and hit enter. This launches the program. Switch to Settings here and select Administrator on the left. Locate Turn on Windows Defender and uncheck the preference and click save changes afterwards.

Please note that this turns off Windows Defender, and that it is recommended to have another antivirus program installed on the system to have it protected against Internet and local threats.

Source: ghacks.net

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/
Share on other sites

in MSE (and i imagine windows defender) you can exclude files. just excludes the hosts file and it should not change it back

^this.

If you modifiy the host file manually, it will trigger a warning (since it's a good way to do man in the middle attacks for example) but you can tell MSE/Windows defender to allow the change, then it won't revert it back.

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595106487
Share on other sites

A lot of anti-malware suites will prevent changes to the hosts file.. common way to hijack sites and such. Exclude or use a different suite.

Yep... can understand their reasons for doing it. Bit annoying though if you do alter your hosts file when doing testing and so forth.

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595106497
Share on other sites

A lot of anti-malware suites will prevent changes to the hosts file.. common way to hijack sites and such. Exclude or use a different suite.

It's the fact that it only blocks some sites, that seems very fishy. If you are going to protect the hosts file in this manner, why not protect it entirely?

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595106829
Share on other sites

It's that fact that it only blocks some sites, that seems very fishy. If you are going to protect the hosts file in this manner, why not protect it entirely?

Look how big facebook.com is. If some trojan decided to link it to a different IP within the hosts file, thats why it only does some domain names. Malware authors dont care about picsofmygranny.com with its 5 users

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595106851
Share on other sites

or just install some parental lock software. Im assuming you want to block facebook so your kids cant go on cause they are too young and not cause you have no self control can't just not go there

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595106877
Share on other sites

It's that fact that it only blocks some sites, that seems very fishy. If you are going to protect the hosts file in this manner, why not protect it entirely?

this

i knew that anti-malware solutions block access to the host file or at least that access triggers a warning; the new thing here is that Windows Defender only blocks some sites, witch is odd.

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595106885
Share on other sites

I am a bit concerned about doubleclick. Is that the common ad platform for Windows 8?

It's one of the biggest ad networks on the internet. Someone being able to redirect all that traffic for their own purposes by modifying someone elses hosts files is quite the issue - considering how many websites have ads served by doubleclick.

By the way, doubleclick is run by Google - Microsoft tends to use their own advertising platform.

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595106903
Share on other sites

It's one of the biggest ad networks on the internet. Someone being able to redirect all that traffic for their own purposes by modifying someone elses hosts files is quite the issue - considering how many websites have ads served by doubleclick.

By the way, doubleclick is run by Google - Microsoft tends to use their own advertising platform.

Ah, that makes sense.

I would be curious to know if other high-profile sites are prevented from being redirected as well. I'd expect at least the Alexa top 50. Right now, we can justify each of those sites individually, but if it's ONLY those two sites, it's worth questioning.

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595106927
Share on other sites

It's the fact that it only blocks some sites, that seems very fishy. If you are going to protect the hosts file in this manner, why not protect it entirely?

I am glad it doesn't protect the whole file. I can still use it for my own work (which uses internal domains).

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595107031
Share on other sites

I can see a very legit use for only doing certain sites. Since DoubleClick is one of the biggest ad networks out there, redirecting it to a mailious IP address using the HOSTS file is a good way to get malware installed. Same with Facebook, and if something like that ever did happen to Mr Average J. User, he wouldn't even begin to know how to fix it.

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595109165
Share on other sites

Can't believe I'm defending Windows 8, but here goes: I did my own testing here with XP, Vista and 7. It has nothing to do with the OS you are using, and everything to do with MSE. End of story, try it for yourself. MSE will remove certain things from your HOSTS file even if it's Read Only.

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595109193
Share on other sites

Can't believe I'm defending Windows 8, but here goes: I did my own testing here with XP, Vista and 7. It has nothing to do with the OS you are using, and everything to do with MSE. End of story, try it for yourself. MSE will remove certain things from your HOSTS file even if it's Read Only.

while true, MSE is install by default on windows 8. By doing this i count MSE on windows 8 as part of the windows 8 OS. Im very interested in this, but am not going dog MS and Windows 8 till more is known.

Link to comment
https://www.neowin.net/forum/topic/1099791-you-can/#findComment-595109283
Share on other sites

This topic is now closed to further replies.
  • Posts

    • Password Safe 3.72.0 by Razvan Serea Password Safe is a password database utility. Like many other such products, commercial and otherwise, it stores your passwords in an encrypted file, allowing you to remember only one password (the "safe combination"), instead of all the username/password combinations that you use. Once stored, your user names and passwords are just a few clicks away. Using Password Safe you can organize your passwords using your own customizable references—for example, by user ID, category, web site, or location. You can choose to store all your passwords in a single encrypted master password list (an encrypted password database), or use multiple databases to further organize your passwords (work and home, for example). And with its intuitive interface you will be up and running in minutes. PasswordSafe was originally designed by the renowned security technologist Bruce Schneier and released as a free utility application. Password Safe 3.72.0 changelog: Fixed bugs Improved font scale handling - should resolve font size issues on high resolution displays. GH1749 In the Master Password Setup window, "Show Master Password" is no longer truncated on some displays. GH1092, SF1595 Size and position of main window is now correctly restored on scaled displays. SF1630 Keep password expiry date when both password and password expiry are changed; don't clear a non-recurring expiry when the password's changed. SF1628 Custom values can now be copied to the clipboard in read-only mode via Ctrl-C and right-click->Copy Value. New features GH1196 Dark display mode support: Password Safe now supports the system display mode, as well as setting the mode directly via Manage->Options->Display->Display Mode. This change also updates the general "look & feel" of the app to the current Windows theme. Known limitations: The Date picker and keyboard shortcut controls do not switch to dark theme The Customize Toolbar dialog does not switch to dark theme Custom Field support has been added to the more advanced features: Filters XML and Text import and export Comparison, Sync and Merge databases SF938 Custom field values may now be selected by name and copied via a "Copy Custom Field Value..." submenu in the entry context popup menu. SF936 Notes and Custom fields layout now overlap, selectable by tabs, resulting in a more compact and less cluttered layout. SF935 Autotype: Specifying '\v{name}' in the autotype text will cause the corresponding value to be autotyped. Download: PasswordSafe 64-bit | Portable 64-bit | ~20.0 MB (Open Source) Download: PasswordSafe 32-bit | Portable 32-bit View: PasswordSafe Website | Quickstart Guide | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Google DeepMind published a document on June 18, 2026, that may be the most consequential admission yet from a frontier AI lab: alignment training alone cannot guarantee that AI agents will remain under human control, so structural containment must be built before more capable models arrive.............. https://www.techtimes.com/articles/318758/20260620/google-deepmind-ai-control-roadmap-when-alignment-fails-defense-depth-takes-over.htm  
    • I've got a SoundBlasterX G6 that I use in my streaming setup. Sounds great to me and I've had zero issues with the ancient software package so far in Win11. That G6 has 7.1, Dolby, fully working SPDIF and since it's a USB device it's outside of my rig so I don't have to worry about EMF distortion. Looks like for now this is a pass for me as I think I have better hardware....
    • How do you connect 5.1 Speakers to this thing?
    • I agree with both of you... It's absolutely imperative that science is completely based on actual proven facts and hard evidence and is not considered dogmatic in any way. Science is not a religion and it will never be, and that's exactly how it's supposed to be.
  • Recent Achievements

    • Dedicated
      JuvenileDelinquent earned a badge
      Dedicated
    • First Post
      DrWankel earned a badge
      First Post
    • Reacting Well
      DrWankel earned a badge
      Reacting Well
    • Week One Done
      Supreme Spray LV earned a badge
      Week One Done
    • Week One Done
      Genuinetonerink- Dubai earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      502
    2. 2
      +Edouard
      169
    3. 3
      PsYcHoKiLLa
      88
    4. 4
      Steven P.
      75
    5. 5
      Michael Scrip
      73
  • Tell a friend

    Love Neowin? Tell a friend!