HOW TO: Block Website On Windows PC Without Using Any Software Programs

Block this site” my friend said when he was sitting on my laptop and instead of making the project ended up wasting the precious time on Facebook, Twitter, Orkut, Myspace or other sites like YouTube and Metacafe. He was furious when he realized that all the time has been wasted and now he would be scolded for not submitting the project. This is really a bad situation, which makes us loose our important time, and with net work done zero.

Well this not the only reason we want to block the sites, in offices most times the employer doesn’t want their employee to spend time on Facebook, Twitter and other social networking sites. Sometimes parents  want to stop their underage children or siblings to access certain 18+ sites at home.

You may be interested in the following related articles as well

Don’t forget to Subscribe to our RSS-feed subscribe to our RSS-feed and Follow us on Twitter follow us on Twitter for recent updates.

Here we are with an easy to use step by step method that does not require any software program to block the websites. The only thing that is required is to edit the hosts file in the system folder of windows.

Here are the Steps on How To Block a Website.

Step 1. Go to ‘C’ drive or whatever is the name of your OS drive.

Step 2. Open up the ‘WINDOWS’ folder and then go to the ‘SYSTEM32’ folder.

Step 3. Select the ‘DRIVERS’ folder and then go to the ‘ETC’ folder.

Step 4. Or instead just open the RUN feature of windows from start menu or using the shortcut keys of win+R and put this address:- c:\WINDOWS\system32\drivers\etc

Step 5. In this folder you will see many files, just select the ‘HOSTS’ file and view its properties.

Step 6. Under the security tab click the edit button that will open another pop window here select the ‘USERS’ you want to block the sites for and check all the options under the ‘PERMISSION for USERS’ heading, {modify, read and execute, read, write}.

Block-Website-On-Windows-29-4-2011

Security Tab

Step 7. Click APPLY and then OK.

Step 8. Locate the ‘HOSTS’ file again and now open it with NOTEPAD.

Step 9. Go to the last line which would be
127.0.0.1 localhost

Step 10. Add in the line beneath this line
127.0.0.1 URL_of_the_website {without the http:// and www.}

Step 11. Like if you want to block twitter insert this line
127.0.0.1 twitter.com

Block-Website-On-Windows-29-4-2011

Block a Website

Step 12. You are done just save the setting and the file. Now if you try to open those websites it will show error.

Now you must be wondering what happened with this tiny line, well now this line tells the browser to point the address to the IP 127.0.0.1 which is your device only. Hence, you are unable to open the web address.

We as usual if something can be locked it can be opened, you just need to find the correct key. In this case, the correct key is removal of the lines you added and you would be able to surf the net easily and can again waste the time

This entry was posted in Internet Tips and tagged , , . Bookmark the permalink.

37 Responses to HOW TO: Block Website On Windows PC Without Using Any Software Programs

  1. drsherif says:

    this will be good for porn sites

  2. I think this post will be helpful for me.Your post will give me the proper way for block unwanted website without using any software.

  3. Sarah says:

    Hey thanks for uploading such a helpful stuff. Actually i was irritated with unwanted websites now blocking them is not a problem for me.
    Sarah´s last [type] ..Untethered Jailbreak for Verizon iPhone 4 427 iOS is Released by iH8sn0w

  4. Steve says:

    Hey folks. Why not just exercise a little bit of self-discipline and just not waste time on all these stupid web sites. Are you so lazy you really need to edit your local hosts file? Quite pathetic.

  5. Ads says:

    Steve, If your not on any social networking sites, or distractable in any way, you must be a rather boring person. I’m not saying you are, but this is a useful post – Don’t flame.

  6. Want to REALLY know what a HOSTS file can do for you, the end user (or corporate environs) & how/why it’s BETTER THAN AdBlock &/or DNS servers alone? Take a peek here guys & enjoy -> http://news.slashdot.org/comments.pl?sid=1913212&cid=34576182

    I’ve been using them for BETTER SPEED, BETTER ONLINE LAYERED SECURITY, & to an extent? Even BETTER “ANONYMITY” (vs. DNS request logs &/or DNSBL)…

    I’ve been doing this since 1997 or thereabouts, & it’s just like putting a “Turbo” onto an engine in a vehicle (w/out the “turbo lag”).

    APK

    P.S.=> And, yes, they really DO work (something “old” folks seemed to have forgotten, that lets YOU get “more bang for the buck” in what you pay every month for ISP/BSP online access by also making you NOT download adbanners as well if you like (which have been found w/ malicious code in them MANY TIMES since 2004 (see URL above))… & since ISP/BSP’s like AT&T & others are moving to a “pay by bandwith use/bandwith cap” type scenarios?? Blocking out adbanners can see you have a gain there not only speed, or potential security, but also BANDWIDTH CONSERVATION! apk

    • Paul Maddox says:

      Seriously, dial down the caps.. :-)

      The hosts file is good, and I’ve been using it to block ads for quite a while, however it’s far from a silver bullet. A number of sites serve ads from the same hostname as their main content (or graphics) or use IP addresses for ads instead. In all of those cases blocks ads isn’t going to work.

      • @ Paul Maddox: Good to see you realize the benefits for SPEED & SECURITY that blocking adbanners via a HOSTS file yields, & I am certain you find them VERY noticeable (especially the speed gain – because again, after all: It’s YOUR MONEY you pay out, & you ought to be getting your money’s worth). If you read what I wrote about HOSTS, DNS, & AdBlock above, then you’d see I did recommend using ALL of them concurrently/simultaneously for the concept of “layered security” (since you can’t REALLY totally “avoid” DNS anyhow, but there are good DNS servers out there in OpenDNS, ScrubIT, & even Google has one), because they tend to “compliment” one another & VERY nicely for extra speed + security online…

        APK

  7. B@Rt says:

    This could get extremely unmanageable because to enter all websites that one can waste their time on will be a daunting task.

  8. Rob says:

    Tired works but only for Internet Explorer. Firefox still goes to the website.

  9. @Rob: Then, you’ve done something wrong man… HOSTS files work for ANY webbrowser (& really, ANY web-bound application (including external to browser email programs such as FULL MS-Outlook &/or Outlook Express, amongst others also).

    APK

  10. @ B@Rt: Then you need to get ahold of an application like this: HOSTSMAN, featured here http://www.mvps.org/winhelp2002/hosts.htm , because it makes managing a HOSTS file an easy GUI “point-N-click” affair!

    It’s that, or doing it via an Access database (SELECT DISTINCT ORDER BY ASC type work for sorting & normalizing/deduplicating a HOSTS file after it’s been properly imported)… that’s more work though than doing it via HOSTSMan.

    I wrote such an app back circa 2002-2010, & I have since moved onto a PyThon script which actually does the job FASTER, & consolidates, sorts, & deduplicates entries into 1 single HOSTS file here, from ALL of the 8-10 reputable sources I use to populate my HOSTS file here vs. maliciously scripted sites or adbanners, botnet servers, & adbanners also (bad or good ones), gaining me back TONS of speed I pay for, & better online “layered security” also in the same file!

    APK

  11. Great post, blocking sites without additional software is really helpful. Thanks

  12. Stan says:

    This isnt anything new here. This has been in uses for about ever now. Mostly blocking ads/ad servers

  13. JG says:

    This is possibly the dumbest security tip ever. It does not prevent me from going to goole and looking up the IP address of any site I want and typing that into the location bar of the browser. Being a security professional this woud require so much administration that you wil give up in a week. Please stop pretending that dumb ideas like this will actually work.

  14. Cody says:

    @ JG

    You might be a security professional, but most people are not. Most people have almost zero computer skill.

    I can assure you that the majority of the people in the company I work for would have a very difficult time going around even this simple of a block.

    Think about it. I work in the IT department, and I recently had to teach a lady how to use “save as”.

    In the past, I drove across town to fix a printer. When I arrived, it was out of paper.

  15. Josh says:

    It’s sad that no one here knew of this long ago. This is generally how many hacks for software work.

  16. @JG: That’s when using firewall rules tables (either software ones OR router based firewalls) to block out IP addresses. This can also be done via HOSTS files, or again, via firewalls in either software OR hardware as well… doing BOTH is the concept of “layered security” though, & that’s the BEST thing we have going & especially IF you only depend on firewalls rules tables, because of ‘kernel mode hooking’? Even software firewalls can be broken, as well as PNP router flashing remotely (or possibly even by a malware locally).

    APK

    P.S.=> IF You want to read more about Kernel Mode hooking of libs & such? Start here… but, that site rootkit.com does a LOT more, with actual code examples – such as this one:

    http://www.rootkit.com/newsread.php?newsid=952

    … apk

  17. @ JG: Additionally? IF you’re a security pro & a network admin, then what the HELL is stopping you from using login scripts to migrate HOSTS files that are updated across all your network nodes/clients/workstations then?? HOSTS are good for stopping domainname/hostname based links (which IS what the majority of malware makers use, period)

    I know – been populating a HOSTS file this way since 1997, & they use host/domain names, because they are RECYCLABLE, unlike IP addresses that once known as bad, get shut down & turned off… whereas a host/domain name means since you own it, you can go to yet another hosting provider & startup a botnet server or maliciously scripted site, in minutes, all over again & with the SAME domain/hosts name – the RBN (Russian Business Network) was notorious for it… (& today, CoreFlood botnet did the same until the FEDS took over their C&C servers)

    If you’re a “security pro” as YOU allegedly SAY you are, you didn’t seem to note anything I stated, & you’d also have noted that LAYERED SECURITY IS THE BEST THING WE HAVE GOING vs. these maliciously scripted threats out there today (& that means using HOSTS files in combination with other tools such as antivirus/antimalware, firewalls, HIPS & more).

    APK

  18. Brandon says:

    Or just sign up at OpenDNS, free account and do the little tutorial and select which security level you want and your done.

    Even easier…

    • anonymouse says:

      @Brandon: Or, you can retain DIRECT control of this yourself, directly, via hosts files edits (which is nothing more than editing a textfile in notepad.exe remembering to save the file as type “all files” when saving your edited version). DNS is also known to have problems (look up DNS poisoning, you’ll see loads on that online and lots more (Dan Kaminsky and Moxie Marlinspike are other names to inquire about this issue with DNS and others on as well)) and until we all go to DNSSEC or IPv6? It’s the way it is. OpenDNS is one of the better ones along with ScrubIT DNS. Both work perfectly in conjunction with hosts files, as do most any DNS servers really, and they compliment one another actually (vs. those known issues in DNS).

  19. This is a very good tip and I needed that to keep control on my kid. I bookmarked the page and I will now apply immediately as described. Thanks a lot..

  20. jignesh patel says:

    Hello…this steps are not worked for me…Please suggest

  21. It is fun, well written and actually gives you the information you need to know, as opposed to many books on the subject.

  22. Pingback: HOW TO: Restore the Factory Settings In Your BlackBerry Playbook | Free Internet Now

  23. This is a great tip. It is nice to be able to do this without having to install some sort of software. There are many companies out there that do this sort of thing. I think the copy what the other is doing. I wonder if they are running into copyright issues as they do this. What do you guys know about this?

  24. cm says:

    I have always wondered how IT companies have blocked certain websites from their employees. In the Indianapolis Web Design industry, we allow our employees to access the social media sites, because it is part of our business. I can see however, that blocking certain websites from my children in the future will be a great thing!

  25. mf says:

    good stuff!! really helpful

  26. apkisatroll says:

    Congrat to all, you’ve been apk’d

    • Nemonkey says:

      @apkisatroll – You’re the one trolling. You must be a malware maker or maliciously scripted site owner obviously threatened by what apk posted.

  27. Oma Sex says:

    Hallo, zahlreichen angesichts f�r alle Aussendung ich werde bei ihnen bereits angeblich mehrmals vorbei ansehen.
    Oma Sex´s last [type] ..1

  28. Jason says:

    Thanks for the tips, these steps worked perfectly for me.

    Jason´s last [type] ..Costa Mesa Chiropractor

  29. how to block gmail, yahoo and other mail websites in host file? help me pls…..

  30. Sameer says:

    plz help me to block all porn adult and social networking site without any software

  31. sluts says:

    I’ve read several excellent stuff here. Certainly value bookmarking for revisiting. I surprise how much attempt you put to make this kind of fantastic informative web site.

  32. click here says:

    lassen Sie mich Ihnen sagen, Sie haben den Nagel auf den Kopf getroffen. Ihre Idee ist hervorragend, die Frage ist etwas,

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge

Subscribe without commenting