View Full Version : How to block a website in all web browser
faye2209
May 21, 2009, 01:34 AM
May I know how to block a website in all web browser? Any effective way?
Libran
May 21, 2009, 01:47 AM
Well you can do it by blocking host
Browse C:\WINDOWS\system32\drivers\etc
Find the file named “HOSTS”
Open it in notepad
Under “127.0.0.1 localhost” Add 127.0.0.2(just add one) sitename , and that site will no longer be accessible.
This may not work in vista though. Let me know in that case..
Libran
May 21, 2009, 01:57 AM
If you are unable to save host file after editing (most likely to happen in case of windows vista), then you will need to edit using administrative privileges. For this, open Notepad with Administrative privileges by clicking Start, All Programs, Accessories, and then right-click Notepad and select to open as Administrator.
Now browse to (C:\Windows\System32\drivers\etc) in Notepad and open the hosts file.
faye2209
May 21, 2009, 03:10 AM
Thanks Libran for answering my question~ :) when I type www.sitename.com or http://www.sitename.com the page is blocked but however if I type sitename.com , the page won't be blocked.. anyway to solve tis also? Thanks for your help very much~!
chuckhole
May 21, 2009, 04:56 AM
In your HOSTS file, you can add multiple entries for the same address. They are separated by spaces. Example:
127.0.0.1 localhost www.sitename.com sitename.com
faye2209
May 21, 2009, 06:28 PM
Thanks chuckhole for answering my question~ :) really thanks to you guys to solve tis problem for me.. finally I can successfully blocked the page I want.. thanks to you all very much.. :D
faye2209
May 21, 2009, 06:47 PM
:o 1 more question to ask u guys.. I am confused with it.. Is it use the same method if I wan to block another difference website too? For example: 127.0.0.1 localhost www.sitename.com sitename.com www.sitename2.com sitename2.com or should be 127.0.0.2 localhost www.sitename2.com sitename2.com :confused:
Libran
May 21, 2009, 08:06 PM
You need to add one for another website (127.0.0.2 )
faye2209
May 21, 2009, 08:30 PM
:o what you mean need to add one for another website (127.0.0.2 ) :confused: tis is what I have in my host file now:
127.0.0.1 localhost
127.0.0.2 www.sitename.com sitename.com
How to add another difference website that I wan to block too? Can you brief me more details.. thank you very much~~ :D
Libran
May 21, 2009, 08:32 PM
127.0.0.1 localhost
127.0.0.2 www.sitename.com sitename.com
127.0.0.3 www.2sitename.com 2sitename.com
127.0.0.4 www.3sitename.com 3sitename.com
An so on
faye2209
May 21, 2009, 09:13 PM
I get what you mean and tested oledi.. but it didn't work for other websites when I put the way like tis.. is it server problem?
Libran
May 21, 2009, 09:24 PM
Hi, I browsed net for more info on this problem. Please don't add 1
Make it this way
127.0.0.1 localhost
127.0.0.1 www.sitename.com sitename.com
127.0.0.1 www.2sitename.com 2sitename.com
127.0.0.1 www.3sitename.com 3sitename.com
And so on
I found and example host file having list of some unwanted websites. You can also replace yours with this one. Have a look
http://www.mvps.org/winhelp2002/hosts.txt
Libran
May 21, 2009, 09:33 PM
If you think, i helped you, then please support me by clicking my username and support. Not necessary though.
faye2209
May 22, 2009, 02:50 AM
Hey thanks for your help Libran~! It's work.. aprreciate it very much~~ :D