Monday, July 7, 2014

A Little Public Service Geekery

All bloggers will know that we get emails from all sorts of spammers.  I rarely get any of the strange, free form poetry that Tam has written about; I usually just get comments about how wonderful my blog is with a link to their site (completely unrelated to the post).  Sometimes those are comically poor English, but don't rise to the level of poetry.

Some emails are harder to categorize as spam.  In the last few months, I've gotten several complaints about browser problems.  People report the blog looks bad on one browser and fine on others, or that they get weird popups.  Some of these emails or comments are obviously spam; others harder to tell, but all seem to be based on the idea that we control that sort of stuff.  We don't.  Unless you're writing your own HTML templates, authors on blogger have very little control over such things.  I'm sure only a small few of us do that.

Most strange things that pop up in your browser are on the reader's end and can be controlled with a hosts file.  There are several sources of these around, but I use this one - the first one someone ever pointed me to.  The site includes all the instructions you need to get started, but it's not really hard and you probably don't need to do everything they talk about. 

Right now, some percentage of you are nodding in agreement, while the rest of you have Looney Tunes-style question marks in the air over your heads.  What's a hosts file?  Hosts is a plain text file that's put in a place reserved for Windows to look.  The file is loaded when you open your browser and effectively presents a list of sites not to accept connections from!  Presto - no browser hijacks, no redirects, no ads, no pop-ups (or, at least, lots less of them). 
You can use a HOSTS file to block ads, banners, 3rd party Cookies, 3rd party page counters, web bugs, and even most hijackers. This is accomplished by blocking the connection(s) that supplies these little gems. The Hosts file is loaded into memory (cache) at startup, so there is no need to turn on, adjust or change any settings with the exception of the DNS Client service (see below). Windows automatically looks for the existence of a HOSTS file and if found, checks the HOSTS file first for entries to the web page you just requested. The is considered the location of your computer, so when an entry listed in the MVPS HOSTS file is requested on a page you are viewing, your computer thinks is the location of the file. When this file is not located it skips onto the next file and thus the ad server is blocked from loading the banner, Cookie, or some unscrupulous ActiveX, or javascript file.

Example - the following entry blocks all files supplied by that DoubleClick Server to the web page you are viewing. This also prevents the server from tracking your movements. Why? ... because in certain cases "Ad Servers" like Doubleclick (and many others) will try silently to open a separate connection on the webpage you are viewing, record your movements then yes ... follow you to additional sites you may visit.
The lovely and longtime computer technician Mrs. Graybeard volunteers at a free clinic for people without health insurance in an "I'll do anything to help" capacity.  Several of the clinic's computers have had browser hijacks and malware that rendered them useless.  By disinfecting them and then installing that hosts file, the number of such problems has dropped radically.  I've been using one for years and have had one Trojan get through on my computers.   

Like everything else, hosts files aren't a perfect answer.  Some of the companies they block do legitimate businesses as well as less scrupulous thing.   Some of the companies that send you commercial (solicited, not spam) email may use one of these blocked sites as the way they handle your email click.  Sometimes you'll find a site that you can't get to even though you're sure it's there and legit; usually, the site you're clicking from has gone through an intermediary in the hosts file.  If you absolutely must be able to click on an email link that the hosts file blocks, or get to that check out service, edit hosts as administrator (XP and Win7 for sure; don't know about others), and delete just that entry (you'll know which site it is from the error box in the browser).  Exit and restart the browser.  You'll now be able to get to that previously blocked website. 
Finally, this is a kind of cyber warfare.  Companies change their domain names to get around the hosts file block and new companies open up that the hosts file doesn't know of.  It is updated regularly to address these changes.  I have a hosts file on every computer at home, but not at work.  The browsing experience is much more pleasant at home without the popups, pop unders, and all the other format ads I get at work.


  1. A Hosts file will work but Ghostery and Ad Block Plus are self updating and do it better....

  2. Howdy SG,
    Thanks for the directives- I'll look into the info at the link. At least it wasn't just me with the occasional issue.
    As you say, there are Plenty of variables potentially glitchable within my computer and within Blogger... At least things seem good on your end:)
    In retrospect/post head's up-At the least for moi, I DO need to lose ol' XP- surely a time bomb. Hate that impending doom feeling which is undoubtedly self fulfilling-Ack!
    Thanks and carry on!

  3. SiG, I work in managed network security for a major telco.
    This kind of quick and dirty fix is exactly the sort of thing more people need to know.

  4. Thanks, Bill.

    I need to go look up Ghostery and see what it looks like.

  5. I, too, use Ghostery and AdBlockPlus. And NoScript. Excellent, don't go anywhere on the internet without them. Unless they break something I actually do want to see, and then I can temporarily enable whatever it is.

    The comments you've been getting are spam. I get them, too, and I see them in the comments on blogs where moderation is not enabled. Many of them go something like one of the following, frequently in bad English:

    "This is a great article, with information I needed for my research paper. I'm subscribing to your blog!" (This will inevitably be on a post that could never be used as research material.)

    "I'm having trouble with the formatting of your site in *whatever browser*. Is anyone else reading this blog having this problem?"

    "Do you agree with me, that some of the comments on this post seem to be from brain-dead individuals?"

    You can copy some of the text from a comment, and do a search on it, and you will see the same identical comment on hundreds of blogs. That was what convinced me that these comments were spam. Indeed, shortly after I realized this, I began receiving multiple identical comments appearing to be from different people.

    I actually don't get them anymore, since I moved to a installation on my own domain. I found a plugin called "NoSpamNX". It adds invisible fields to your comment form -- invisible to real people, but bots see them and think they need to be filled. If any of these fields are filled, the comment is automatically deleted, because it couldn't have been made by a human. Perhaps something similar is available on Blogger?