How To

How To Block Website Through Host File In Windows XP

Do you want to block website from being accessed in Windows? This one’s going to be a quick but useful post showing how to block website from Windows operating system. I am pretty sure that most of you guys already know this but somehow my intention is to help those who still don’t have any idea that they can protect their young ones by preventing them going into prohibited sites – meaning not intended for minors.  This can be done without downloading any fancy softwares or plugins for your browsers.  All you have to do is alter the file named “host” file by adding the IP address or URL of the website you wanted to block.

So how am I supposed to edit this file to block website in Windows? Let’s assume you are using Windows operating system (OS) – I am going to use Windows XP environment as an example. The default directory of host file is under:

[note]C:WINDOWSsystem32driversetc
*** for UNIX flavors /etc/hosts
*** for MAC users /private/etc/hosts[/note]

Windows-XP-host-File-Location

Open it with your favorite text editor – I am going to use notepad with my example. NOTE: In Windows environment since this has no file extension – it’s not being recognized easily by your OS so you have to open it by opening first your Notepad application and locate the host file from using the Notepad’s File – Open navigation menu. Basically, this is how a host file looks like:

 Host-File

Now, let’s say you wanted to block www.facebook.com all you have to do is add the line below in your host file:

Adding-Website-To-Host-File

Save your file and then try it by opening your favorite browser and try going to the site you just blocked – for this example try www.facebook.com. You will notice that your browser will give you an Error 404 message or simply means that the page cannot be found:

Error-404

And even when you execute a PING test, you’ll notice that the site you just blocked is pointing to the IP address you specified in your host file.

Ping-Response

Below is short raw video showing how to block website through host file in Windows 7. The steps is the same with almost all Windows operating system.

[youtube=href=http://www.youtube.com/watch?v=xm1UcnHY3yw&w=600&h=450]

Post Comment