Welcome to just another day at "AARAMBH"!!! Get Daily Updates right into your Inbox for Free.

How to Block Websites without using any Software

If you're new here, you may want to subscribe to my RSS feed or get daily updates via E-mail. Thanks for visiting!

Many times we need to unblock certain websites to gain access to some important stuffs. We all know many ways to do that. But how about actually learning to block one?

Have you even been in a situation when you have to block certain websites from your computer for any reason? Well, I am not sure about any body else but certainly I have been many times in such situation. Parents may also want to prevent access to certain websites on their computer so that children can’t get to them from internet.

So what’s the solution?

Aaaah… It’s very simple.

1.) Open “Run” from the start menu (or press WinKey + r). Just copy paste the following path and hit ENTER.

notepad %windir%\system32\drivers\etc\hosts

Alternately, go to C:\Windows\System32\Drivers\Etc and find the file “hosts”. Open that file in Notepad.

2.) When this hosts file is opened in Notepad, at the end of the file you will see something like “ localhost”.

3.) Under “ localhost” just add another website URL that you want to block.

For Example:- localhost www.rakshitk.com www.whoismadhur.com

4.) Make sure every time you add another website, the last digit of the address 127.0.0.x should not be the same.


5.) Save the file and exit.

So, here you go. Restart your browser if it is opened and changes will take place immediately.

The good thing is that no message, no pop ups nothing will be displayed when someone tries to open a blocked website. Your browser will just fail to open those websites without any error messages.

If you like this article and want to get daily updates, do subscribe to my RSS feed or get daily updates via E-mail.

77 Responses to “How to Block Websites without using any Software”

  1. eches says:

    I’ve been using this tricks for quite some time but primarily not for blocking ads. I added few online game sites. That way, my little brother can’t play online games that affect the network speed. haha

    on the other note, you may take a look at this page.It gives big list of ads companies. I always put kontera ads inside the file and remove other companies such as adsense etc. That way you will be able to eliminate text popup from kontera and still able to see other ads.

  2. Rakshit says:

    hahaha.. very intelligent eches. Even I have done something like this. My little sis is almost addicted to orkut and other social sites, so guess what, I have blocked all of them.

    The page you provided is very informative.

    Thanks buddy for your valuable comments.

  3. Andy Bailey says:

    very useful! I think I need to add facebook to my hosts list and keep sticky fingers away from my keyboard :-)

    Andy Baileys last blog post… CommentLuvvers – Interesting sites that use the CommentLuv Plugin

  4. Nirmal says:

    Maybe your brother is reading this now. :D

    Nice tips, we use host file in my office PC for connecting to client machines and databases.

    Nirmals last blog post… Freeware: Edit Images with Multi-Layer Support with Photobie

  5. Rakshit says:


    That’s amazing. Didn’t know about that. Perhaps, after few months when I get into the job, I can explore more about the hosts file usability.

  6. Rakshit says:

    Welcome to Aarambh!!!

    Well, its really tough to get away from addictions. Keep trying buddy.

  7. Haris says:

    Very useful tip including all the comments. This has just solved many problems of mine. Thanks! :)

    Hariss last blog post… Download UXtheme.dll Patch For Windows XP SP3

  8. Rakshit says:

    No problem Haris.

    Its good that you find it useful.

  9. [...] Update:- If in case you are looking for a tutorial to actually BLOCK any website on your computer that too without using any software, follow this link. [...]

  10. Rakshit says:

    Welcome to Aarambh, Moin. Hoping to see you more.

  11. Steve Yu says:

    Cool! Now what websites should I block? :D

    Steve Yus last blog post… How to Trace and Recover Stolen PC?

  12. Manoj says:

    This is indeed a tricky one Rakshit..

    Manojs last blog post… Convert any File Format Online – youconvertit

  13. Kannan says:

    Can we block microsoft from accessing our computer or any other daemon site which monitors our system by this way?

  14. Manish says:

    I have used your trick..but it is not working with my browser…:)

  15. Rakshit says:

    Nice suggestion. You certainly cannot block microsoft.

    Are you using any proxy server to connect to the internet? This technique does not work with most of the proxy servers

  16. Mike says:

    Well, I’ve been using this idea for quite a while, but I simply forgot about it! I’ve got several hundred lines in my hosts file for the purpose of blocking ads. However, one difference is that all of mine link to I’m not quite sure why you say not to have the same .1 at the end. It simply tells the browser to look at this address for the content at that site.

  17. Rakshit says:

    Yes, it can also be used for blocking ads.

    According to my knowledge, if we use same .1 at the end, it will not able to block the web address mentioned after that. For every site we have to use different last digit.

    But as you said, it is working with .1 as well. I have also tried the same. Works perfectly.

    Thanks for notifying this.

  18. hikmat says:

    I want to block some websites on my computer.I have tried the hosts file but its not working,is there that you can tell me about that.Thank you.

  19. solomon says:

    hey ! I tried this it works good on IE but not with mozilla Firefox can u guys help me on that ???

  20. Rakshit says:

    Hey Solomon,

    It works perfectly fine with Firefox as well. Which version of Firefox are you using?

  21. innocent says:

    well i would like to know how to generate traffic to my site and also is can you teach me how to nublock websites because i dont know how to do them and also one more thing,can you also give me details on how to access websites .

    innocent’s last blog post… Essential Elements of a Successful Trader

  22. Rakshit says:

    For generating traffic on your blog, there is one and only million dollar formula. MAKE YOUR CONTENT STRONG AND STRONG ENOUGH SO THAT YOU VISITORS TURN OUT TO BE YOUR REGULAR READERS. Content is KING.

    For unblocking websites, visit here.

  23. innocent says:

    well,am ok with your answer but i still would like to be tutored on how to have access to a website e.g http://www.mtnonline.com. pls check out this site to see if i can hack into it or have access it and also tell me how.

    innocent’s last blog post… Essential Elements of a Successful Trader

  24. [...] computer … Recognizing and Avoiding Fraudulent Websites Protect your computer with Three free …http://www.rakshitk.com/blog/2008/05/18/how-to-block-websites-without-using-any-software/Blocking Unwanted Parasites with a Hosts FileAnother feature of the HOSTS file is its ability to [...]

  25. Thanks for this. Article which your writen was so important for me. Thanks again :)

  26. Amazing article! Detailed and very interested. I am going to recommend this blog to my friends.

  27. amit says:

    sorry buddy
    i know this
    but it doesnot work
    i tried this so many times

  28. krushna says:

    This is a very nice article Really

  29. Krushna says:

    Dear Rakshit
    I followed this article.It works well,but i am not able to block gmail.

    Can u help me out please ?


  30. ryan says:

    ive done what it says in the instructions but it just isnt working. trying to block brother playing stupid online games that use up all the bandwith and downloads :|

  31. Ana says:

    I’ve tried this and it isn’t working. I get to where it says save and then I get:

    cannot create the C:\WINDOWS\system32\drivers\etc\hosts file
    Make sure that the path and file name are correct.

    What am I doing wrong and how can I fix this because I really need to do this. Thank you.

  32. videoay says:

    this very nice, thank you.

  33. jon says:

    Though it is possible to block sites via hosts file, software slution is way better from security standpoint. http://www.parentalfiltercontrol.com/ lists a few products.

  34. Matt says:

    It doesn’t work for me. This keeps popping up:

    cannot create the C:\WINDOWS\system32\drivers\etc\hosts file
    Make sure that the path and file name are correct.


  35. chris says:

    HOSTS file is not always in that File guys do a search for HOST file make sure you SAVE with out an extension.

    HOST. works HOST.TXT does not work. notepad likes to add the .txt is the local machine and localhost is the url name to itself. SO

    localhost 127.0.0.

  36. pranaw kumar poddar says:

    i will try this method in office. can u tell me it’s work in server or not

  37. A good and interesting read, thank you.

  38. Rosenrod says:

    Thank you – I’ll be sure to check back later for more of your posts.

  39. Dll Files says:

    I worked for me… Thanks for the nice tip…

  40. If you ever want to see a reader’s feedback :) , I rate this article for 4/5. Decent info, but I have to go to that damn yahoo to find the missed bits. Thank you, anyway!

  41. Dll Files says:

    I found that you can even disable live messenger with that method… Works great for office computers :)

  42. libaan says:

    It really amazing instruction….
    cause am going to do this action with my little Brother who’s going to have Exam the next view weeks cause he always west his time playing games
    thankz alot agian

  43. annz says:

    hey I have tried doing that and there are a few sites that still do not block.so how do i do that?and also google searchs for the sites still show up too

    http://postnext.com/ will not block at all

  44. Tom says:

    Hijackthis was just about the best tool for software troubleshooting . . . but now that trendmicro bought it; I worry.

  45. Wow that’s actually a simpel method. I never thought of that way. Always using the router to block a single website. Thanks for the tip guy’s

  46. Kristy says:

    it will not let me save the changes. Says make sure the file path and name are correct. Suggestions?

  47. Hi kristy,

    You are probably using Windows Vista. What you need to do is the following:
    right click on the hosts file. In the dropdown menu go to properties then go to the security tab. There you see a couple of group/user names. Select the group users. Below you see the security settings for this group. Click to select the full control permissions. Then click apply and edit your hosts file. After your done editting follow these steps again to uncheck the full controll permissions. For security reasons.

  48. Arcades says:

    Thanks, if you’re bored visit my site

  49. Frank says:

    Does this work in Vista?? I followed the directions above and got unable to create C:\Windows\System32\Drivers\Etc\hosts. How do I block websites in vista??

Leave a Reply

CommentLuv badge