How to Block Any Website!

First make a hosts file if it already isn't there.

You should do this on Linux (Ditto for BSD): touch /etc/hosts (Do this as root).

You shouldn't be using MacOS: touch /private/etc/hosts (Do this as root).

You shouldn't be using Windows: Just open notepad and save it as admin as C:\Windows\System32\drivers\etc\hosts (Windows NT is pain).

The syntax is simply adding 0.0.0.0 *insert website here* to the hosts file.

Want to block a random website that doesn't respect your privacy?

0.0.0.0 amazon.com

Bam!

Your son has an addiction to politics? *laughs nervously*

0.0.0.0 electionbettingodds.com

Bam!

Want to block all connections chromium makes without your consent?

0.0.0.0 accounts.google.com

0.0.0.0 google.com

0.0.0.0 update.googleapis.com

0.0.0.0 redirector.gvt1.com

0.0.0.0 clients4.google.com

0.0.0.0 translate.googleapis.com

0.0.0.0 www.google.com

0.0.0.0 www.gstatic.com

0.0.0.0 chrome.google.com

0.0.0.0 ssl.gstatic.com

0.0.0.0 accounts.gstatic.com

0.0.0.0 accounts.youtube.com

0.0.0.0 chromeos-ca.gstatic.com

0.0.0.0 clients1.google.com

0.0.0.0 clients2.google.com

0.0.0.0 clients3.google.com

0.0.0.0 cloudsearch.googleapis.com

0.0.0.0 commondatastorage.googleapis.com

0.0.0.0 cros-omahaproxy.appspot.com

0.0.0.0 dl.google.com

0.0.0.0 gl-ssl.google.com

0.0.0.0 gweb-gettingstartedguide.appspot.com

0.0.0.0 m.google.com

0.0.0.0 omahaproxy.appspot.com

0.0.0.0 pack.google.com

0.0.0.0 policies.google.com

0.0.0.0 safebrowsing-cache.google.com

0.0.0.0 safe-browsing.google.com

0.0.0.0 storage.googleapis.com

0.0.0.0 safe-browsing.googleapis.com

0.0.0.0 tools.google.com

0.0.0.0 www.googleapis.com

0.0.0.0 alt1.gstatic.com

0.0.0.0 alt2.gstatic.com

0.0.0.0 alt3.gstatic.com

0.0.0.0 alt4.gstatic.com

0.0.0.0 alt5.gstatic.com

0.0.0.0 alt6.gstatic.com

0.0.0.0 alt7.gstatic.com

0.0.0.0 alt8.gstatic.com

0.0.0.0 alt9.gstatic.com

0.0.0.0 alt10.gstatic.com

0.0.0.0 alt11.gstatic.com

0.0.0.0 alt12.gstatic.com

0.0.0.0 alt13.gstatic.com

0.0.0.0 alt14.gstatic.com

0.0.0.0 alt15.gstatic.com

0.0.0.0 alt16.gstatic.com

0.0.0.0 alt17.gstatic.com

0.0.0.0 alt18.gstatic.com

0.0.0.0 alt19.gstatic.com

0.0.0.0 alt20.gstatic.com

0.0.0.0 alt21.gstatic.com

0.0.0.0 alt22.gstatic.com

0.0.0.0 alt23.gstatic.com

0.0.0.0 alt24.gstatic.com

0.0.0.0 alt25.gstatic.com

0.0.0.0 alt26.gstatic.com

0.0.0.0 alt27.gstatic.com

0.0.0.0 alt28.gstatic.com

0.0.0.0 alt29.gstatic.com

0.0.0.0 alt30.gstatic.com

0.0.0.0 alt31.gstatic.com

0.0.0.0 clients2.googleusercontent.com

0.0.0.0 lh3.ggpht.com

0.0.0.0 lh4.ggpht.com

0.0.0.0 lh5.ggpht.com

0.0.0.0 lh6.ggpht.com

0.0.0.0 mtalk.google.com

0.0.0.0 connectivitycheck.android.com

0.0.0.0 play.google.com

0.0.0.0 android.com

0.0.0.0 google-analytics.com

0.0.0.0 googleusercontent.com

0.0.0.0 redirector.gvt2.com

0.0.0.0 redirector.gvt3.com

0.0.0.0 redirector.gvt4.com

0.0.0.0 redirector.gvt5.com

0.0.0.0 gcm-http.googleapis.com

0.0.0.0 gcm-xmpp.googleapis.com

0.0.0.0 android.googleapis.com

0.0.0.0 fcm.googleapis.com

0.0.0.0 fcm-xmpp.googleapis.com

0.0.0.0 pki.googleapis.com

0.0.0.0 clients5.google.com

0.0.0.0 clients6.google.com

0.0.0.0 clients7.google.com

0.0.0.0 clients8.google.com

0.0.0.0 connectivitycheck.gstatic.com

0.0.0.0 lh1.googleusercontent.com

0.0.0.0 lh2.googleusercontent.com

0.0.0.0 lh3.googleusercontent.com

0.0.0.0 lh4.googleusercontent.com

0.0.0.0 lh5.googleusercontent.com

0.0.0.0 lh6.googleusercontent.com

0.0.0.0 lh7.googleusercontent.com

0.0.0.0 lh8.googleusercontent.com

0.0.0.0 lh9.googleusercontent.com

Why would chromium do this (;-;)

Well, I hope you found this useful, if you want you can have the hosts file that I use.

Back to the front page