02 Jan, 2008
The easiest method to blocking websites
Web Development » Tutorials » The easiest method to blocking websites
There are many ways to block a website – there are thousands of website filter software available these days, but the easiest way to block an unwanted website without installing any software is by editing hosts file. Yes, that’s right. I only found that out after reading Block Unwanted Websites – by just editing host file blog post on Techie Portal website. I knew about hosts file and I knew how it worked before I discovered the post but it has never come across my mind to use it as a way to block unwanted websites on your computer. Ah the little things that you overlook.
Open HOSTS file which is located at C:/windows/system32/drivers/etc using notepad.
Lets say you want to block www.hityou.com
Just add 127.0.0.1 www.hityou.com as shown in the image above. You may also add the site without the www. for added safety.
Thats it !!! Now when you try to open the website, your browser will be unalbe to connect to this website because the DNS for the website has been changed to 127.0.0.1 instead of the real DNS.
To find out more about how to block unwanted sites by editing hosts file, check out the original post.
Technorati Tags: blocking, hosts, websites, access



![[Screenshot of HOSTS file]](http://eisabainyo.net/weblog/wp-content/uploads/2008/12/hostfile.jpg)



