Block Sites with the Hosts file
August 3rd, 2008
Hidden in the depths of the operating systems there lies a Hosts file. This Hosts file maps hostnames to IP addresses so can be used to redirect a website url and even block it.
Location of the Hosts file:
- Windows NT/2000/XP/2003/Vista:
%SystemRoot%\system32\drivers\etc\is the default location, which may be changed. The actual directory is determined by the Registry key\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath. - Windows 95/98/Me:
%WinDir%\ - Linux and other Unix-like operating systems:
/etc - Mac OS 9 and earlier: System Folder: Preferences or System folder (format of the file may vary from Windows and Linux counterparts)
- Mac OS X:
/private/etc(uses BSD-style Hosts file) - OS/2 and eComStation:
"bootdrive":\mptn\etc\ - Symbian 1st/2nd edition phones:
C:\system\data\hosts - Symbian 3rd edition phones:
C:\private\10000882\hosts, only accessible with file browsers with AllFiles capability, most are not.
If you open the file Read more…