This is not a duplicate of How come hosts file redirection fails?

Every morning, after logging into my office wifi, I am redirected to msn.com, a "news" site that I do not much care for. I decided I'd block the site with hosts rediection, but found this task quite difficult.

I have added the following to the host file   bing.com www.bing.com   msn.com www.msn.com   microsoft.com www.microsoft.com

Checking the result with a ping, shows that only Bing is actually changed.

Pinging bing.com [] with 32 bytes of data: ...
Pinging msn.com [] with 32 bytes of data: ...
Pinging microsoft.com [] with 32 bytes of data: ...

In Windows 10, does Microsoft prevent redirection for these sites? If so, is there an alternate way for me to block msn.com?


3 Answers 3


Yes, Windows does bypass the hosts file for certain Microsoft URLs

This link was provided in a comment that disappeared before I got the user's name


... starting in XP Pro SP2 and W2K3 SP1, various Microsoft-related URLs cannot be bypassed by placing alternate IP addresses in the Windows hosts file. It appears to be a strategy by Microsoft to not allow malicious host file changes to stop Microsoft patch updates, plus hardcoding a few other Microsoft URLs.

This bypass affects the following urls:

  • windowsupdate.microsoft.com
  • windowsupdate.com
  • microsoftupdate.com
  • download.microsoft.com
  • update.microsoft.com
  • microsoft.com
  • www.microsoft.com
  • support.microsoft.com
  • wustats.microsoft.com
  • microsoftupdate.microsoft.com
  • office.microsoft.com
  • msdn.microsoft.com
  • go.microsoft.com
  • msn.com
  • www.msn.com
  • msdn.com
  • www.msdn.com

eclipz905's answer has a very good explanation of why this happens, but to answer your question on how to still block it you will need to use the windows firewall.

Open the "Windows Firewall with Advanced Security" application by searching the start menu, go to Outbound Rules and make a new rule.

Do the following steps in the Wizard

  1. In the "Rule Type" page choose "Custom Rule"
  2. In the "Program" page choose "All Programs"
  3. In the "Protocol and ports" page choose "Any protocol"
  4. In the "Scope" page, under "Remote Addresses" choose "These IP Addresses"
  5. Enter in the IP of the sites you want to block, you may need to do a nslookup from the command line for the site to get the IPs the site could be.
  6. In the "Action" page choose "Block the connection"
  7. In the "Profile" page choose all 3 profiles.
  8. In the "Name" page give the rule a name.

Once you do this the IP address for those web pages will be blocked. It is not as accurate as modifying the hosts file, because if more than one site shares a IP you block both of them, but it does not get blocked by windows.


Windows 10 sends and receives a slew of data, including Binge, ads and user searches. To regain some bandwidth and privacy,

  1. Turn off live tile apps.

  2. Adjust Windows privacy settings.

  3. Use a third party tool to control settings through Registry and Policies. Note that some of these tools contain adware themselves -- see the reviews and test any executable with VirusTotal.

  4. Finally, if MS Office cannot be fixed, consider a free office tool such as LibreOffice or OpenOffice. These are almost one-to-one replacements for the MS suite.

  • The behavior witnessed by the author has little to do with them running Windows 10. The behavior has been around for nearl 16 years. What does this question have to do with MS Office though?
    – Ramhound
    Aug 9, 2016 at 15:56
  • This doesn't answer Does Microsoft prevent hosts file redirection for its websites?.
    – TheKB
    Aug 9, 2016 at 15:59
  • Yes, as indicated by @eclipz905, it seems MS ignores \etc\hosts for its own URL's. My answer was a work-around. Aug 9, 2016 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .