There are many reason why you need to know how to block a website. Some of the most common reasons are you have been targeted by spammers who use adware and popups to attack your PC. Other reasons may be to prevent your children from having access to certain site content such as porn and gambling.
4. Now enter 127.0.0.1 and the "website you want block " without quotes
5. You can add all the websites that you want to block in the same format and finally click save That's it we have successfully blocked websites by editing the hosts file
6. If you find it difficult to do it manually every time you can make a batch file to block websites
Example :-
7. Copy the above code in a note pad and save it as something.bat .Now once you click the the batch file google.com and yahoo.com are blocked you can modify the batch file according to your needs
Hope you liked this post .If you have any doubts please feel free to comment
You need not waste money on buying software's to block websites you can use this method to block any website you want
How to Block websites without any Software
1. To block websites we need to edit Host file which is usually in C:/Windows/System32/drivers /etc
2. To edit Hosts file open notepad click open and go to C:/Windows/System32/drivers /etc
3. Open the host.file which looks like image shown below
2. To edit Hosts file open notepad click open and go to C:/Windows/System32/drivers /etc
3. Open the host.file which looks like image shown below
4. Now enter 127.0.0.1 and the "website you want block " without quotes
5. You can add all the websites that you want to block in the same format and finally click save That's it we have successfully blocked websites by editing the hosts file
6. If you find it difficult to do it manually every time you can make a batch file to block websites
Example :-
@echo off
echo 127.0.0.1 www.google.com >> C:\windows\system32\drivers\etc\hosts.txt
echo 127.0.0.1 www.yahoo.com >> C:\windows\system32\drivers\etc\hosts.txt
exit
7. Copy the above code in a note pad and save it as something.bat .Now once you click the the batch file google.com and yahoo.com are blocked you can modify the batch file according to your needs
Hope you liked this post .If you have any doubts please feel free to comment
it will work till you can't find that site in google.com
REPLYwhen you find it in google.com it will come to you and though you blocked that website you can be able to go in it...
but good work...
jeetpatelindia1@gmail.com
@anonymous
no it will work !!! i am 100 % sure ..
you can find it in google but when you open it it will be blocked if
its not blocking try adding http:// in front
eg
http://google.com
sure i have tasted these article when i was workin on windows security @ Appin Lab it work well.... pretty little trick nice one man u re doing a great work...
REPLYit's asking me to save the hosts file in another location when i modify it.. i am using windows7... could you help me?
REPLY@srinivas
Right click and open notepad as administrator then follow the steps in the tutorial
yeah... its working.. thank you
REPLYcool site bro
REPLY(you can check out my blog abt gadgets too [but this is not intended to be a spam])
Thank you thanks a lot it worked
REPLYcan you provide a batch script that will revert the change,, that is, will delete the these lines from the hosts file..??
REPLYUse the form below to comment. No spam please!!!