Windows XP Tweaks: How To Block A Website Through Windows Host File

This one’s going to be a quick but useful post. 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? 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:

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

Windows XP host File Location Windows XP Tweaks: How To Block A Website Through Windows Host File

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 Windows XP Tweaks: How To Block A Website Through Windows 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 Windows XP Tweaks: How To Block A Website Through Windows 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 Windows XP Tweaks: How To Block A Website Through Windows Host File

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 Windows XP Tweaks: How To Block A Website Through Windows Host File

Type the words you are looking for here.

About
Arsie also known as RC, professionally, is a Software Test Engineer (STE) from an outsourcing company based here in the Philippines. At the same time, he is also a freelancer tech blogger who writes any news, updates, current events, tricks, tips, and even reviews in the world of Information Technology. You can contact Arsie through our Eyes4Tech Contact page. Or you can also follow his updates on Facebook, Twitter or Google+.

Advertisement

No comments

Leave a Reply

CommentLuv badge

More in How To (61 of 64 articles)
Facebook Old Chat Window


There had been reports and even wall posts on Facebook's fan page that most of the Facebook users didn't like the ...