Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I modified hosts file to block and its subdomains but it blocks only the main domain name. It does not block the subdomains. Windows 7 Starter

It blocks but dows not block

Then I tried this one: * It didn't helped.

share|improve this question

migrated from Dec 19 '09 at 18:45

This question came from our site for professional and enthusiast programmers.

Why would you want to block Google? – wallyk Dec 19 '09 at 17:14
It is just an example domain. I do not want to show the real domain here. – Anonymous Dec 19 '09 at 17:17
Why the downvote? I'm guessing it was before the migration, but just in case, it's a perfectly valid question. – Maxim Zaslavsky Dec 19 '09 at 20:14
Maybe edit this to read to stop the freak-out comments? – Clayton Hughes Jul 13 '10 at 5:21
up vote 7 down vote accepted

The hosts file is very basic, and by basic i mean BASIC. You are going to have to do


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.

share|improve this answer

The hosts file doesn't support wildcards. You will need an ad blocking proxy / DNS program to do that. See e.g. TreeWalk DNS

share|improve this answer

I think your hosts file may be being rolled back by the built-in Windows Defender.

Deactivate Defender then edit the hosts file, making sure to remove any read-only attribute.

share|improve this answer
windows defender is a windows 8 thing. This question predates it by about 3 years. – Journeyman Geek Nov 12 '12 at 11:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.