Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How could I block a website from opening on my computer regardless of the browser I use . I tried modifying the host file with no success so far . Any ideas?

share|improve this question

3 Answers 3

One of 2 options I can think of right this second. Edit the host file or block it in windows firewall.

host: Let's say you want to block google.com

Open notepad as administrator, find notepad in the Start menu, right click, open as admin or search for notepad in the search bar in the start menu and right click open as admin.

Once notepad is opened goto:

C:\Windows\System32\drivers\etc

Open the hosts file

Add under all the text a line by itself without a # in front of it (# means that line is a comment and will do nothing).

to block google for instance:

0.0.0.0 google.com

Save

Now when you go to google.com in any browser, it tries to grab the page from the 0.0.0.0 ip which goes no-where.

share|improve this answer

maybe it's redirected website if so blocking via host does not work until you enter the redirected web address in host file.

share|improve this answer
    
Thanks, Kaveh . I have just solved the problem . I used a program called hostsman and the website is blocked :) –  nabil Nov 26 '12 at 10:39
    
wow great!, that's a very handy tool. thanks for recommended it to me. –  Kaveh Nov 26 '12 at 10:59

I think this problem has been solved, but for completeness I'll add this: Firefox Addon - Kitten Block

Because you probably want to put something on one of these browsers in addition to the system 32 solution say, because the "unable to connect" page is a rubbish place to keep going.

share|improve this answer
    
What a fantastic add-on! –  wonea Nov 27 '12 at 10:43
1  
regardless of the browser -- I'd say a Firefox addon is pretty browser-specific... –  Bob Nov 27 '12 at 10:50
    
I'm saying you make the actual changes in system32 but you cover it up on the browser level for aesthetic reasons. –  Nathan Cooper Nov 27 '12 at 11:04
    
There are probably more boring scripts for this you can run on greasemonkey (e.g.) for non-mozilla-fans. –  Nathan Cooper Nov 27 '12 at 11:11
    
Unfortunately , the site somehow worked again after it was blocked. The method I tried is obviously not working . –  nabil Nov 28 '12 at 5:29

protected by Community Jul 15 at 10:30

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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