Hosts file effectiveness

R

RobertVA

Am I misunderstanding the use of the Hosts file to block web sites?

I thought adding "127.0.0.1 acme.com" was supposed to override the
Domain Name Server's data for the IP address when ANY browsers requested
a page from acme.com (made up domain name), directing the browser to the
local hard drive. Since the requested page probably isn't on my hard
drive this should permit me to block things like advertising pop-ups
from that site.

So many sites won't function without JavaScript. I'm not enthusiastic
about turning it off.

However, I continue to find cookies from these domains when I scan for
tracking cookies. Third party cookies are turned off in my browser
security settings too. Today I was even subject to a pop-up window with
one of the supposedly blocked domains displaying in the browser address bar!

IF the sites opening these ads are using the site's actual IP address to
bypass the Hosts file, should the address bar be displaying the IP
address or the URL?

TIA
 
R

RJK

Have you...

IE | drop down Tools | Internet options | Privacy | Advanced | "Block"
third party Cookies ??

regards, Richard
 
J

John Wunderlich

Am I misunderstanding the use of the Hosts file to block web
sites?

I thought adding "127.0.0.1 acme.com" was supposed to
override the Domain Name Server's data for the IP address when ANY
browsers requested a page from acme.com (made up domain name),
directing the browser to the local hard drive. Since the requested
page probably isn't on my hard drive this should permit me to
block things like advertising pop-ups from that site.

So many sites won't function without JavaScript. I'm not
enthusiastic about turning it off.

However, I continue to find cookies from these domains when I scan
for tracking cookies. Third party cookies are turned off in my
browser security settings too. Today I was even subject to a
pop-up window with one of the supposedly blocked domains
displaying in the browser address bar!

IF the sites opening these ads are using the site's actual IP
address to bypass the Hosts file, should the address bar be
displaying the IP address or the URL?

TIA

Keep in mind that the Hosts file is strictly a one-to-one mapping and
it will override DNS lookups. The line in your example will block
access to "acme.com" but won't block access to "www.acme.com" or
"anything.acme.com" or "ads.acme.com".

-- John
 
K

Kayman

Am I misunderstanding the use of the Hosts file to block web sites?

I thought adding "127.0.0.1 acme.com" was supposed to override the
Domain Name Server's data for the IP address when ANY browsers requested
a page from acme.com (made up domain name), directing the browser to the
local hard drive. Since the requested page probably isn't on my hard
drive this should permit me to block things like advertising pop-ups
from that site.

So many sites won't function without JavaScript. I'm not enthusiastic
about turning it off.

However, I continue to find cookies from these domains when I scan for
tracking cookies. Third party cookies are turned off in my browser
security settings too. Today I was even subject to a pop-up window with
one of the supposedly blocked domains displaying in the browser address bar!

IF the sites opening these ads are using the site's actual IP address to
bypass the Hosts file, should the address bar be displaying the IP
address or the URL?
HOSTS files are IMO overated. If you're on IE7 use IEPro.
 
T

Twayne

Am I misunderstanding the use of the Hosts file to block web sites?
I thought adding "127.0.0.1 acme.com" was supposed to override
the Domain Name Server's data for the IP address when ANY browsers
requested a page from acme.com (made up domain name), directing the
browser to
the local hard drive. Since the requested page probably isn't on my
hard drive this should permit me to block things like advertising
pop-ups
from that site.

So many sites won't function without JavaScript. I'm not enthusiastic
about turning it off.

However, I continue to find cookies from these domains when I scan for
tracking cookies. Third party cookies are turned off in my browser
security settings too. Today I was even subject to a pop-up window
with one of the supposedly blocked domains displaying in the browser
address bar!
IF the sites opening these ads are using the site's actual IP address
to bypass the Hosts file, should the address bar be displaying the IP
address or the URL?

TIA

I suspect the following links will be useful to you. MVPS.org has a
very useful HOSTS file I've used for quite awhile now and like. There
are many others, too.
Be sure to read about how to keep a large HOSTS file from slowing down
your computer; MVP org provides a batch file to help that along.

Lots of info in these:
http://en.wikipedia.org/wiki/Hosts_file

http://www.mvps.org/winhelp2002/hosts.htm

http://www.mvps.org/winhelp2002/hostsfaq.htm

http://accs-net.com/hosts/what_is_hosts.html

http://everythingisnt.com/hosts.html

Except for MVPx... I don't recommend anyone or anything, but there are
some good ones out there. These links are provided in the interest of
information, not recommendation of the sites themselves.

Twayne
 
R

RobertVA

John said:
Keep in mind that the Hosts file is strictly a one-to-one mapping and
it will override DNS lookups. The line in your example will block
access to "acme.com" but won't block access to "www.acme.com" or
"anything.acme.com" or "ads.acme.com".

-- John

That would explain much of what's slipping through. Does whatever
processes the Hosts file recognize any wild card characters like "*"? It
would be handy if something like "127.0.0.1 *acme.com" would block
anything from the "acme.com" domain including sub-domains ("www..." or not).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top