Your Hosts file is an important system file for network communications, and it can be used as a rudimentary method for blocking Internet sites. Given the fact that the IP address 127.0.0.1 always points to your local computer, you can modify your Hosts file so that a website that you want blocked is mapped to that IP address.
Say that you wanted to block "www.facebook.com". Modify your Hosts file so that it contains this line:
127.0.0.1 www.facebook.com
Now if you direct your Web browser to "www.facebook.com" you will instead be directed back to your local computer. The reason this happens is that in parsing the domain name (www.facebook.com) your computer looks to the Hosts file for resolving the DNS address instead of to an external system which would return the real IP address for Facebook.
The ability to use a Hosts file has led some folks to develop rather complete blocking solutions for individual computers. One popular one is available at the following page:
https://winhelp2002.mvps.org/hosts.htm
Basically, what is offered is a copy-and-paste way to block sites through your Hosts file, which can be simple and effective.
There is one caveat with using a solution such as the MVPS HOSTS file: It can have some unexpected results. One rather personal example is that the MVPS HOSTS file blocks anything related to a popular e-mail fulfillment service known as AWeber. It just so happens that WindowsTips (and other Tips.Net publications) utilizes AWeber for publishing newsletters. That means that on a system that includes, in its Hosts file, information copied and pasted from the MVPS HOSTS file, the user won't be able to click any of the links in the WindowsTips newsletter or any other Tips.Net newsletter. This occurs for reasons already discussed in this tip.
The moral of the story is that if you decide to use a Hosts-file-based solution provided by someone else, make sure that you understand what is actually being blocked. (You could use the MVPS HOSTS solution, but you'll want to search through the file for any entries containing the characters "aweber." Delete those lines—there should be two of them—and you can again access any links in Tips.Net newsletters, including the links in WindowsTips.)
As noted, using the Hosts file to block content is effective, but it is rather rudimentary because (1) you could always remove this line from your Hosts file, or (2) specify the IP address in your browser, thus bypassing your Hosts file altogether.
This tip (12875) applies to Windows 7, 8, and 10.
Your Hosts file is an important file as far as network communications go, and you can easily edit it to suit your needs. ...
Discover MoreWindows 10 comes with a nice replacement for Internet Explorer (which is still retained for those who need it). This new ...
Discover MoreFor security reasons, you may want to scan your system for open ports. This tip explains a bit about ports and how to see ...
Discover MoreFREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."
2017-05-03 16:52:31
Tom Sellers
I wish I had seen your aweber tip long ago. For weeks it caused me grief with numerous websites. Not just newsletters. I could not see my stock portfolios (on Barchart's website), or login to some internet based subscriptions I used (at stockcharts.com). I must have re-installed java dozens of times thinking that was the problem. I had even considered re-installing Windows until I ran a test and temporarily deleted my hosts MVP file. Eventually I tracked it down to aweber. I don't know how many hours of frustration this caused me. However, it would appear from the comment from Carl, perhaps the new MVP files have already addressed this problem - I was not diligent about updating the hosts file because I have some of my own custom entrys in there as well.
2017-01-09 14:52:23
Carl Bolstad
I've been using the mvps HOSTS file for years and the Windows Tips for months, and never had a problem following the links in the newsletter. I just looked at the most recent HOSTS file (12/20/2016) and found that there is an entry for clicks.aweber.com, but it is commented out, with the comment "affects newsletters". So apparently the mvps people have noticed and fixed this problem.
FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2021 Sharon Parq Associates, Inc.
Comments