Block Google and F-book crap using your hosts file

Status
Not open for further replies.

Darth_vader

Member
Joined
Apr 5, 2013
Messages
327
Xref: http://forums.radioreference.com/fo...g-script-when-opening-threads-not-forums.html


>> Oh yeah, I also have a hosts file for Google Everything® if anybody wants it.
>>
> If you can post it in this thread like you did the FB stuff in your previous post, I'm interested in seeing it.

Here you go. Same drill as before, just append it to your existing hosts file next to the FB stuff I posted above.
Code:
#Begin code block

127.0.0.1 localhost

# ALWAYS make sure "127.0.0.1 localhost" is the first line in your /hosts file
# or your system or browser may malfunction!

# See https://en.wikipedia.org/wiki/Hosts_file to find the standard locations
# of the HOSTS file for your particular OS. In Linux (and probably BSD), it's
# usually under /etc/hosts

# Yes, I know there are some redundant entries in this block--you can grep it
# and remove them yourself if it really matters. I'm too lazy to do it myself.

# Redistribute and republish freely!

#first, let's redirect English google.com search to Startpage
216.218.239.164 google.com       #} redirects to us2.startpage.com:443
216.218.239.164 www.google.com   #} 216.218.239.164 is the IP address for the 
216.218.239.164 google.ca        #} Google frontend Startpage and automatically
216.218.239.164 www.google.ca    #} switches to https (443), even if http (80)
216.218.239.164 google.co.uk     #} is specified. SP is much more secure a
216.218.239.164 www.google.co.uk #} search engine and far more privacy-friendly
216.218.239.164 google.ie        #} than Google itself could ever hope to be.
216.218.239.164 www.google.ie    #}

#127.0.0.1 ajax.googleapis.com #commented out for compatibility with sites that
#127.0.0.1 apis.google.com     #dependencies on them some reason or other

#Youtube
127.0.0.1 youtube.com              #} you know the story
127.0.0.1 www.youtube.com          #}

127.0.0.1 i0.ytimg.com             #} mostly thumbnails, user pictures and
127.0.0.1 i1.ytimg.com             #} other unnecessary graphic clutter. Feel
127.0.0.1 i2.ytimg.com             #} free to leave blocked, as it also
127.0.0.1 i3.ytimg.com             #} improves YT's loading time considerably
127.0.0.1 i4.ytimg.com             #}
127.0.0.1 i5.ytimg.com             #}

127.0.0.1 s0.2mdn.net              #} comment out everything in this segment
127.0.0.1 static.2mdn.net          #} from this point down if you need to use
127.0.0.1 www.youtube-nocookie.com #} YT, since these next few servers are its
127.0.0.1 youtube-nocookie.com     #} dependencies and can cause major
127.0.0.1 youtube-noscript.com     #} functionality problems if blocked
127.0.0.1 www.youtube-noscript.com #}
127.0.0.1 s.ytimg.com              #} (s.ytimg.com is where the player is)

#various other G services - main pages
127.0.0.1 accounts.google.com #} comment out if you need to use G-mail
127.0.0.1 mail.google.com     #}
127.0.0.1 gmail.com           #}
127.0.0.1 www.gmail.com       #}
127.0.0.1 sites.google.com
127.0.0.1 code.google.com
127.0.0.1 maps.google.com
127.0.0.1 groups.google.com #} real Usenetters don't use Google Groups
127.0.0.1 gg.google.com     #}
127.0.0.1 plusone.google.com
127.0.0.1 fusion.google.com
127.0.0.1 plus.google.com
127.0.0.1 goog.le
127.0.0.1 youtu.be #youtu.be/AaBbCcDdEeFf is the same as youtube.com/watch?v=AaBbCcDdEeFf

#and here's where everything else originates. What a mess!
127.0.0.1 domains.googlesyndication.com
127.0.0.1 video-stats.video.google.com
127.0.0.1 4.afs.googleadservices.com
127.0.0.1 pagead2.googleadservices.com
127.0.0.1 partner.googleadservices.com
127.0.0.1 www.googleadservices.com
127.0.0.1 apps5.oingo.com
127.0.0.1 www.appliedsemantics.com
127.0.0.1 service.urchin.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 googlesyndication.com
127.0.0.1 ads.googlesyndication.com
127.0.0.1 www.googlesyndication.com
127.0.0.1 adwords.google.com
127.0.0.1 googleanalytics.com
127.0.0.1 ssl.googleanalytics.com
127.0.0.1 www.googleanalytics.com
127.0.0.1 google-analytics.com
127.0.0.1 .google-analytics.com
127.0.0.1 ssl.google-analytics.com
127.0.0.1 www.google-analytics.com
127.0.0.1 www.googletagservices.com
127.0.0.1 ssl.googletagservices.com
127.0.0.1 .googletagservices.com
127.0.0.1 googletagservices.com
127.0.0.1 www.gstatic.com
127.0.0.1 csi.gstatic.com
127.0.0.1 doubleclick.com
127.0.0.1 .doubleclick.com
127.0.0.1 gan.doubleclick.net
127.0.0.1 doubleclick.net
127.0.0.1 .doubleclick.net
127.0.0.1 ad.doubleclick.net
127.0.0.1 ad-g.doubleclick.net
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 ad.ie.doubleclick.net
127.0.0.1 static.doubleclick.net
127.0.0.1 partner.googleadservices.com
127.0.0.1 ssl.gstatic.com
127.0.0.1 clients.google.com
127.0.0.1 clients1.google.com
127.0.0.1 clients2.google.com
127.0.0.1 clients3.google.com
127.0.0.1 clients4.google.com
127.0.0.1 clients5.google.com
127.0.0.1 clients6.google.com
127.0.0.1 clients7.google.com
127.0.0.1 clients8.google.com
127.0.0.1 clients9.google.com
127.0.0.1 clients0.google.com
127.0.0.1 sassets.vevo.com   #} some Youtube-related ad servers
127.0.0.1 2975c.v.fwmrm.net  #}
127.0.0.1 m.v.fwmrm.net      #}
127.0.0.1 .fwmrm.net         #}
127.0.0.1 ytimg.googleusercontent.com # needless Youtube-related graphic clutter
127.0.0.1 html5shiv.googlecode.com
127.0.0.1 b3.caspio.com
127.0.0.1 ajax.microsoft.com
127.0.0.1 buttons.googlesyndication.com
127.0.0.1 googleusercontent.com
127.0.0.1 lh0.googleusercontent.com
127.0.0.1 lh1.googleusercontent.com
127.0.0.1 lh2.googleusercontent.com
127.0.0.1 lh3.googleusercontent.com
127.0.0.1 lh4.googleusercontent.com
127.0.0.1 lh5.googleusercontent.com
127.0.0.1 lh6.googleusercontent.com
127.0.0.1 lh7.googleusercontent.com
127.0.0.1 lh8.googleusercontent.com
127.0.0.1 lh9.googleusercontent.com
127.0.0.1 s.googleusercontent.com
127.0.0.1 s0.googleusercontent.com
127.0.0.1 s1.googleusercontent.com
127.0.0.1 s2.googleusercontent.com
127.0.0.1 s3.googleusercontent.com
127.0.0.1 s4.googleusercontent.com
127.0.0.1 s5.googleusercontent.com
127.0.0.1 s6.googleusercontent.com
127.0.0.1 s7.googleusercontent.com
127.0.0.1 s8.googleusercontent.com
127.0.0.1 s9.googleusercontent.com
127.0.0.1 chrome.google.com
127.0.0.1 fonts.googleapis.com
127.0.0.1 checkout.google.com
127.0.0.1 .ggpht.com
127.0.0.1 lh1.ggpht.com
127.0.0.1 lh2.ggpht.com
127.0.0.1 lh3.ggpht.com
127.0.0.1 lh4.ggpht.com
127.0.0.1 lh5.ggpht.com
127.0.0.1 lh6.ggpht.com
127.0.0.1 fonts.googleapis.com
127.0.0.1 gp1.googleusercontent.com
127.0.0.1 gp2.googleusercontent.com
127.0.0.1 gp3.googleusercontent.com
127.0.0.1 gp4.googleusercontent.com
127.0.0.1 gp5.googleusercontent.com
127.0.0.1 gp6.googleusercontent.com
127.0.0.1 gp7.googleusercontent.com
127.0.0.1 chart.apis.google.com

#crap from Doubleclick - mostly ad/spyware servers
127.0.0.1 conversion-pixel.invitemedia.com
127.0.0.1 analytics-api-samples.googlecode.com
127.0.0.1 m1.2mdn.net
127.0.0.1 rmcdn.2mdn.net
127.0.0.1 rmcdn.f.2mdn.net
127.0.0.1 n339.asp-cc.com
127.0.0.1 ads.cc-dt.com
127.0.0.1 clickserve.cc-dt.com
127.0.0.1 creative.cc-dt.com
127.0.0.1 clickserve.dartsearch.net
127.0.0.1 clickserve.eu.dartsearch.net
127.0.0.1 clickserve.uk.dartsearch.net
127.0.0.1 doubleclick.net
127.0.0.1 ad.doubleclick.net
127.0.0.1 ad-g.doubleclick.net
127.0.0.1 ad2.doubleclick.net
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
127.0.0.1 ad.br.doubleclick.net
127.0.0.1 ad.ca.doubleclick.net
127.0.0.1 ad.ch.doubleclick.net
127.0.0.1 ad.cl.doubleclick.net
127.0.0.1 ad.cn.doubleclick.net
127.0.0.1 ad.de.doubleclick.net
127.0.0.1 ad.dk.doubleclick.net
127.0.0.1 ad.es.doubleclick.net
127.0.0.1 ad.fi.doubleclick.net
127.0.0.1 ad.fr.doubleclick.net
127.0.0.1 ad.gr.doubleclick.net
127.0.0.1 ad.hk.doubleclick.net
127.0.0.1 ad.hr.doubleclick.net
127.0.0.1 ad.hu.doubleclick.net
127.0.0.1 ad.ie.doubleclick.net
127.0.0.1 ad.in.doubleclick.net
127.0.0.1 ad.jp.doubleclick.net
127.0.0.1 ad.kr.doubleclick.net
127.0.0.1 ad.it.doubleclick.net
127.0.0.1 ad.nl.doubleclick.net
127.0.0.1 ad.no.doubleclick.net
127.0.0.1 ad.nz.doubleclick.net
127.0.0.1 ad.pl.doubleclick.net
127.0.0.1 ad.pt.doubleclick.net
127.0.0.1 ad.ro.doubleclick.net
127.0.0.1 ad.ru.doubleclick.net
127.0.0.1 ad.se.doubleclick.net
127.0.0.1 ad.sg.doubleclick.net
127.0.0.1 ad.si.doubleclick.net
127.0.0.1 ad.terra.doubleclick.net
127.0.0.1 ad.th.doubleclick.net
127.0.0.1 ad.tw.doubleclick.net
127.0.0.1 ad.uk.doubleclick.net
127.0.0.1 ad.us.doubleclick.net
127.0.0.1 ad.za.doubleclick.net
127.0.0.1 ad.n2434.doubleclick.net
127.0.0.1 ad-emea.doubleclick.net
127.0.0.1 creatives.doubleclick.net
127.0.0.1 dfp.doubleclick.net
127.0.0.1 feedads.g.doubleclick.net
127.0.0.1 fls.doubleclick.net
127.0.0.1 fls.uk.doubleclick.net
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 ir.doubleclick.net
127.0.0.1 iv.doubleclick.net
127.0.0.1 m.doubleclick.net
127.0.0.1 motifcdn.doubleclick.net
127.0.0.1 motifcdn2.doubleclick.net
127.0.0.1 n4052ad.doubleclick.net
127.0.0.1 n4403ad.doubleclick.net
127.0.0.1 n479ad.doubleclick.net
127.0.0.1 paypalssl.doubleclick.net
127.0.0.1 pubads.g.doubleclick.net
127.0.0.1 s2.video.doubleclick.net
127.0.0.1 survey.g.doubleclick.net
127.0.0.1 anon.doubleclick.speedera.net #not sure if this is an actual DC server or not, but here it is
127.0.0.1 doubleclick.ne.jp
127.0.0.1 www3.doubleclick.net
127.0.0.1 www.doubleclick.net
127.0.0.1 doubleclick.com
127.0.0.1 www2.doubleclick.com
127.0.0.1 www3.doubleclick.com
127.0.0.1 www.doubleclick.com
127.0.0.1 tpc.googlesyndication.com
127.0.0.1 ad.rs.doubleclick.net
127.0.0.1 affiliate.2mdn.net
127.0.0.1 clickserve.us2.dartsearch.net
127.0.0.1 ad-apac.doubleclick.net
127.0.0.1 ad.mo.doubleclick.net
127.0.0.1 adclick.g.doubleclick.net
127.0.0.1 gan.doubleclick.net
127.0.0.1 googleads2.g.doubleclick.net
127.0.0.1 n4061ad.hk.doubleclick.net
127.0.0.1 securepubads.g.doubleclick.net
127.0.0.1 ad.bg.doubleclick.net
127.0.0.1 cm.g.doubleclick.net
127.0.0.1 stats.g.doubleclick.net
127.0.0.1 fls.au.doubleclick.net
127.0.0.1 log2.quintelligence.com
127.0.0.1 www.destinationurl.com
127.0.0.1 doubleclick.shockwave.com
127.0.0.1 www3.webhostingtalk.com
127.0.0.1 ad.mirror.co.uk
127.0.0.1 host3.adhese.be
127.0.0.1 mcmads.mediacapital.pt
#End code block

By blocking both FB *and* G, it's possible to make it appear as though the IQ of the Web in general has risen about 100 points.
 
Last edited:

Darth_vader

Member
Joined
Apr 5, 2013
Messages
327
And just to make sure this doesn't get buried and lost on the other forum:

Code:
#Begin code block

127.0.0.1 localhost

# ALWAYS make sure "127.0.0.1 localhost" is the first line in your /hosts file
# or your system or browser may malfunction!

# See https://en.wikipedia.org/wiki/Hosts_file to find the standard locations
# of the HOSTS file for your particular OS. In Linux (and probably BSD), it's
# usually under /etc/hosts

# Redistribute and republish freely!

127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
127.0.0.1 m.facebook.com
127.0.0.1 fb.com
127.0.0.1 ns1.facebook.com
127.0.0.1 ns2.facebook.com
127.0.0.1 ns3.facebook.com
127.0.0.1 ns4.facebook.com
127.0.0.1 ns5.facebook.com
127.0.0.1 register.facebook.com
127.0.0.1 pixel.facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 pt-br.facebook.com
127.0.0.1 es-la.facebook.com
127.0.0.1 fr-fr.facebook.com
127.0.0.1 de-de.facebook.com
127.0.0.1 ar-ar.facebook.com
127.0.0.1 hi-in.facebook.com
127.0.0.1 zh-cn.facebook.com
127.0.0.1 ja-jp.facebook.com
127.0.0.1 apps.facebook.com
127.0.0.1 error.facebook.com
127.0.0.1 connect.facebook.com
127.0.0.1 connect.facebook.net
127.0.0.1 badge.facebook.com
127.0.0.1 static.ak.connect.facebook.com
127.0.0.1 static.ak.facebook.com
127.0.0.1 s-static.ak.facebook.com
127.0.0.1 graph.facebook.com
127.0.0.1 ah0.facebook.com
127.0.0.1 ah1.facebook.com
127.0.0.1 ah2.facebook.com
127.0.0.1 ah3.facebook.com
127.0.0.1 ah4.facebook.com
127.0.0.1 ah5.facebook.com
127.0.0.1 ah6.facebook.com
127.0.0.1 ah7.facebook.com
127.0.0.1 ah8.facebook.com
127.0.0.1 fb.net
127.0.0.1 facebook.net
127.0.0.1 www.facebook.net
127.0.0.1 m.facebook.net
127.0.0.1 ns1.facebook.net
127.0.0.1 ns2.facebook.net
127.0.0.1 ns3.facebook.net
127.0.0.1 ns4.facebook.net
127.0.0.1 ns5.facebook.net
127.0.0.1 register.facebook.net
127.0.0.1 pixel.facebook.net
127.0.0.1 login.facebook.net
127.0.0.1 pt-br.facebook.net
127.0.0.1 es-la.facebook.net
127.0.0.1 fr-fr.facebook.net
127.0.0.1 de-de.facebook.net
127.0.0.1 ar-ar.facebook.net
127.0.0.1 hi-in.facebook.net
127.0.0.1 zh-cn.facebook.net
127.0.0.1 ja-jp.facebook.net
127.0.0.1 apps.facebook.net
127.0.0.1 error.facebook.net
127.0.0.1 badge.facebook.net
127.0.0.1 static.ak.connect.facebook.net
127.0.0.1 static.ak.facebook.net
127.0.0.1 graph.facebook.net
127.0.0.1 static.ak.fbcdn.net
127.0.0.1 b.static.ak.fbcdn.net
127.0.0.1 external.ak.fbcdn.net
127.0.0.1 profile.ak.fbcdn.net
127.0.0.1 fb.me
127.0.0.1 ogp.me
127.0.0.1 fbshare.me
127.0.0.1 .fbshare.me
127.0.0.1 widgets.fbshare.me
127.0.0.1 on.fb.me
#End code block
 

kruser

Well Known Member
Premium Subscriber
Joined
Nov 25, 2007
Messages
5,048
Location
W St Louis Cnty, MO
Thanks for posting the lists.
I've used almost all you have listed for quite a while but had not checked for new ones in some time.
I found several in your list that were not in my hosts file so those are now added for when I do use a custom hosts file.

I often run with the default hosts file but these entries are very handy to have in an alternate hosts file when you encounter a site with problems.
That's also when I'll switch over to FF and take advantage of the noscript type add ons.
 

WayneH

Forums Veteran
Super Moderator
Joined
Dec 16, 2000
Messages
7,538
Location
Your master site
For Firefox there are Google, Twitter and Facebook Disconnect add-ons that allow you to permit or block(default) on a site by site basis.

For IE the most effective is modifying the Hosts file IMO. IE just can't meet the intervention ability FF and Chrome have.
 

Darth_vader

Member
Joined
Apr 5, 2013
Messages
327
For what it's worth (and as a convenience to readers) I consolidated both the Google and F-book lists on here into one big, ready-to-run text file: http://mistman.pdp10.org/pub/comp/internet-tools/hostsfiles/goofbook/hosts

That will probably be where updates occur (and has some extra snark in the comments that I didn't think to post here earlier.)

"The hosts files there get updated every three months or so."

Yeah, the winhelp2002 hosts file (http://winhelp2002.mvps.org/hosts.txt) is an excellent resource. Been using it myself for probably the last 7-8 years or so. A large portion of the Doubleclick section in the Google list was sourced from it (all the rest is from my own research.)
 
Last edited:

QDP2012

Member
Joined
Feb 8, 2012
Messages
1,921
Thank you again for the hosts file mods. The FB-block alone significantly improved load-time on my end, not just with the Forums and the Wiki, but with some other sites that were slow for formerly unknown reasons. :)

Much appreciated,
 

poltergeisty

Truth is a force of nature
Banned
Joined
May 7, 2004
Messages
4,012
Location
RLG, Fly heading 053, intercept 315 DVV
I always use YouTube so I won't block that. It's a same they sold out to Google as they have really jacked up the site. But I use Startpage for most of my searches. I just run Noscript and several other privacy add-ons for Firefox.

I run a WRT54GL flashed with DD-WRT and I tried this, but couldn't get it to work. Ad blocking - DD-WRT Wiki
 

Darth_vader

Member
Joined
Apr 5, 2013
Messages
327
And last (but assuredly not least):

Code:
#Begin code block
127.0.0.1 localhost

127.0.0.1 twitter.com
127.0.0.1 www.twitter.com
127.0.0.1 platform.twitter.com
127.0.0.1 a0.twimg.com
127.0.0.1 a1.twimg.com
127.0.0.1 a2.twimg.com
127.0.0.1 a3.twimg.com
127.0.0.1 dev.twitpic.com
127.0.0.1 twitter-badges.s3.amazonaws.com
127.0.0.1 t.co

#End code block

There are probably lots more associated with this particular company, but these few are the only ones I've encountered in the wild. I imagine I'd probably find a substantial volume of others if I were to actually go to that site and look around. If anybody knows of any others connected to these, please do post them here.
 

Darth_vader

Member
Joined
Apr 5, 2013
Messages
327
Append this to your hosts file if you use Youtube:

Code:
127.0.0.1  s.youtube.com   #} Nasty little statistic tracker called when
127.0.0.1  s1.youtube.com  #} the video stream player is active
127.0.0.1  s2.youtube.com  #}
127.0.0.1  video-stats.l.google.com
=========================================================

CORRIGENDUM:
Code:
127.0.0.1  goog.le
in the main list above should actually read:
Code:
127.0.0.1  goo.gl
 
Last edited:

Darth_vader

Member
Joined
Apr 5, 2013
Messages
327
In addition to the winhelp2002 hosts file, here is another good one to know and use:
http://someonewhocares.org/hosts/hosts

And here is something to listen to as you're parsing it:
https://youtube.com/watch?v=BOurcVpft4c

EDIT:
I should point out that he rather sneakily comments out the two tattletale "google-analytics" entries in the "<maybe-spy>" part of the "<spyware-sites>" section, saying it "breaks some sites". Now go to his site's main page, view the HTML in your text editor, and note the contents of the Javascript block at the very bottom. Heh, pretty cute.
 
Last edited:

Darth_vader

Member
Joined
Apr 5, 2013
Messages
327
Is that a WinNT thing? Under "System services" in Kcontrol, I don't see anything that seems to resemble that so I'm guessing it must be.
 

poltergeisty

Truth is a force of nature
Banned
Joined
May 7, 2004
Messages
4,012
Location
RLG, Fly heading 053, intercept 315 DVV
Control Panel | Administrative Tools | Services. Find the DNS Client and disable it. This will not only speed up the host file from not cacheing all entries, but help prevent DNS poisoning. Some say it breaks the DNS, I think they are idiots. If you're like me and use DD-WRT in the router you can cache DNS entries in the router its self and don't need the DNS Client Service.
 

kruser

Well Known Member
Premium Subscriber
Joined
Nov 25, 2007
Messages
5,048
Location
W St Louis Cnty, MO
Control Panel | Administrative Tools | Services. Find the DNS Client and disable it. This will not only speed up the host file from not cacheing all entries, but help prevent DNS poisoning. Some say it breaks the DNS, I think they are idiots. If you're like me and use DD-WRT in the router you can cache DNS entries in the router its self and don't need the DNS Client Service.

But you do need it if you are a domain member.
 

kruser

Well Known Member
Premium Subscriber
Joined
Nov 25, 2007
Messages
5,048
Location
W St Louis Cnty, MO
I saw that no services depend on the service DNS Client.

Many services have no dependencies as they run standalone.

In the case of the DNS Client service, it can be disabled if you are not running in a domain environment but it is needed if you are a domain member or client. Before I setup a domain network, I did disable the DNS Client service with no ill effects but once I setup a domain controller and joined that domain, I quickly discovered all kinds of things break if the service is not running.

Not sure what happens if you are part of a Workgroup network (with other computers or networked printers on the network) and the service is stopped. I'd guess some things may stop working. If you are the only computer, then disabling that service should be fine.
 

poltergeisty

Truth is a force of nature
Banned
Joined
May 7, 2004
Messages
4,012
Location
RLG, Fly heading 053, intercept 315 DVV
Meh, I never use anything NetBIOS related. In fact I have NetBIOS blocked in the router. If I want to share files over the network I use a small app called Secure Socket File Transfer. I think that's what it's called. Never tried it on a 64 bit system though.
 
Status
Not open for further replies.
Top