HOST file questions

I haven’t monkeyed with the HOST file since moving to Windows 7, so there may have been changes that nullify these questions.

Is there a managed program/service that regularly updates the HOST file with new incarnations and finds? From what I understand, wildcards (e.g., *.doubleclick.net) don’t work so you need to have multiple entries. As soon as doubleclick adds another subdomain, it’s getting through your HOST file.

If I do have doubleclick.net in the HOST file, will it still show up in the NoScript alert? Or will Firefox recognize that it’s pointing to home and, once I’ve allowed 127.0.0.1 globally, it will no longer show up.

(By the way, is allowing 127.0.0.1 in NoScript a bad idea?)

Lastly (I think), can the HOST file point to a local file instead of an IP address (e.g., c:\somedirectory\I’m in ur HOST.htm)? If not, is there any way to tell differentiate between a Web page that’s unreachable or in the HOST file?

No-really-I’m-not-kidding-lastly, what’s the convention on capitalization?

Thanks,

Rhythm

Installing and using Privoxy would solve most or all of your problems. Managing your hosts file by hand is not worth it if you just want ad-blocking.

All this stuff is largely invisible to Firefox, and it won’t affect NoScript at all. All Firefox sees is that some domains resolve really fast and don’t serve any content.

No. You need a proxy to do things like that. A proxy is a program that sits in-between your browser and the Internet and looks at everything that passes between the two, taking action on specific patterns. Privoxy is a proxy; I don’t think it can do what you want here, but you can chain proxies if you find one that does.

Yes: An unreachable web page either will have a domain name that doesn’t resolve to anything or it will be on a server that returns an HTTP error code. A web page stored on a server blocked by your hosts file will be on a server that resolves to your local machine, which may serve up content of its own (as Privoxy does).

Modifying the hosts file is not the optimal tool for this. You want a dynamic filtering application.

Correct.

You may be thinking of the LMHOSTS file which does allow inclusion of other files.

Lower case.

Do note Can't modify the Hosts or Lmhosts file - Windows Server | Microsoft Learn

I’ve never bothered with proxy filtering or ad-blocker plugins. For years, I’ve just manually updated the HOSTS file from Blocking Unwanted Connections with a Hosts File

It’s updated every 3 or 4 weeks and I’ve found it more than adequate to stop the vast majority of ads and popups.

Huh? From RFC952: “No distinction is made between upper and lower case.”

Thanks!

There’s a lot of information in Privoxy’s FAQ page (not even its manual), so I need to digest a lot there before I have any questions about it.

Since I have AdBlock and NoScript, seeing ads isn’t that much of an issue. But unless I’m missing a preference setting, there is no way to get NoScript to permanently forbid doubleclick (as an example) and stop giving me that red notification icon.

I’ve basically picked up the belief that keeping a host file (or something similar) relatively up to date is simply prudent. In a nice touch, mvps is what I use as the basis. But updating every once in a while seems so … so … antiquated. Hence the genesis of the question about an app that could do it for me in the background.

Oh, about the case: I was asking about its use in writing. I’ve seen it both upper and lower case, and the file itself is all caps. Any story or reason behind that?

Adding entries to the host file to “block” unwanted sites while browsing the web has always been a hack. Heck, using the hosts file for anything these days is almost antiquated.

As others have said, use proper content filtering software/browser plugins to achieve this. Doesn’t Adblock allow wildcards to allow you to block anything coming from doubleclick.com? Also, how does NoScript work for you? Do sites like SDMB work properly?

Regarding the case – well for the filename itself, since it (probably) originated on unix-like systems, case mattered and it had to be lowercase AFAIK. However, hostnames were never case sensitive on the internet as we know it, so the contents of the file itself didn’t matter if it was upper or lowercase.

True, but using lower case makes it a lot easier to read. The question was about the convention, not the rule.

Yes. In fact, the pattern-matching in AdBlock is much more complex than simple globbing.

You can selectively unblock scripts with NoScript. You can even set NoScript to allow all scripts and use it for its other security features (XSS blocking, Clickjacking blocking, etc.).