hosts file and unblocked subdomains
5,821
Solution 1
The hosts file is very basic, and by basic i mean BASIC. You are going to have to do
127.0.0.1 google.com
127.0.0.1 www.google.com
127.0.0.1 wave.google.com
127.0.0.1 docs.google.com
etc
If you are trying to pull a prank, use that, if you want to get serious, you need to invest in a network firewall or some such that will allow you to block domain names.
Solution 2
The hosts file doesn't support wildcards. You will need an ad blocking proxy / DNS program to do that. See e.g. TreeWalk DNS
Related videos on Youtube
![ilhan](https://i.stack.imgur.com/0ivuN.jpg?s=256&g=1)
Comments
-
ilhan almost 2 years
I modified hosts file to block google.com and its subdomains but it blocks only the main domain name. It does not block the subdomains. Windows 7 Starter
127.0.0.1 google.com
It blocks google.com but dows not block www.google.com
Then I tried this one: 127.0.0.1 *google.com It didn't helped.
-
Admin over 14 yearsWhy would you want to block Google?
-
Admin over 14 yearsIt is just an example domain. I do not want to show the real domain here.
-
Maxim Zaslavsky over 14 yearsWhy the downvote? I'm guessing it was before the migration, but just in case, it's a perfectly valid question.
-
Clayton Hughes almost 14 yearsMaybe edit this to read example.com to stop the freak-out comments?
-
-
Thalys over 11 yearswindows defender is a windows 8 thing. This question predates it by about 3 years.
-
barej about 5 yearsAnd google doubleclick.net knows how to get around that by spamming the subdomains.