Easiest Way To Block Websites

Quick Register
User Name:
Human Verification

Go Back   UNP > UNP Misc > Technology

UNP Register


Old 28-Dec-2009
Question Easiest Way To Block Websites

If you are system administrator at a school, college or office, then you must be looking for a good way to block useless websites like Register, Register, Register, Register etc. from the computers. Or if you are a parent, then you may want to block certain websites from your computer so that you children donít open them by mistake.
The best solution would be to use some commercial software to block these websites. Another way would be to configure a proxy filter at the network gateway. Both these solutions are the good ways to block websites. But if you are looking for a cheap solution (read Free) which involves little or no technical expertise, then you can use http://en.wikipedia.org/wiki/Hosts_file to block websites.

How To Use Hosts File To Block Websites?

1. Open hosts file in a text editor.
The location of hosts file depend upon your operating system,
  • For Windows NT/2000/XP/2003/Vista/7, it is %SystemRoot%\system32\drivers\etc\
  • For Windows 95/98/Me, it is %WinDir%\
  • For all flavours of Linux and unix, it is located at /etc/hosts
  • For Mac OS 9 and earlier, go to System Folder->Preferences
  • For Mac OS X, it is located at /private/etc/hosts
If you are on windows vista or windows xp, go to click on start->run type, notepad %SystemRoot%\system32\drivers\etc\hosts, and press enter

For other operating systems, simply open the hosts file in any text editor.
2. When the hosts file is open, just look for the line, localhost
Now under this line, add the names of website that you ant to block, in the following format, websiteToBlock
For instance, if you wish to block twitter from your computer, then the following files must be added to the hosts file, Register twitter.com

After adding all the websites that you want to block, save the file. Now try to open the blocked websites in your browser. Yes, it works
To unblock the websites again, simply remove those lines from hosts file.
Following is the video demonstration of blocking websites with the help of hosts file-


Old 28-Dec-2009
Vaibhav Kumar
Re: Easiest Way To Block Websites


Old 29-Dec-2009
Und3rgr0und J4tt1
Re: Easiest Way To Block Websites


Old 29-Dec-2009
Re: Easiest Way To Block Websites

gud work thanks

Post New Thread  Reply

« Steps to Speed Up Your Computerís Performance | Need some help with utorrent »