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. Ed says:

    dude i need help..it doesnt work for me..i mean when i follow the steps they’re okay but when i save it, a pop up screen shows that i should make the file name and path name correct..also instead of etc appearing, its ::1 that appears..help me out please..thanks..really appreciate it

  2. eiron says:

    hi rakshitk,
    nice one, i’ve done it and it works. tnx.
    question: can you teach me how to view private photos in friendster?
    hope you could help me.

  3. Rob says:

    In order to save, make sure you are doing this as an administrator.

  4. Chirayu says:


    it,s not working on my Google chrome

  5. saayed says:

    it worked nicely for some website but not working for http://www.agame.com. any ideas??

  6. theone says:

    hello sir, can you help me to block the site of other computer in a network without knowing the user of it.thnxxxxxxxxxxx

  7. soban says:

    hi sir i hve problem when continuing above process bc when i open host in notepad it shows nothing like u mentioned above its blank. plz guide me how i block website waiting for ur reply tnks

  8. chrys says:


    I tried your directions for BLOCKING a site on a single computer(Sorry, I did mean “Blocking” on my previous comment) but could not find any “ localhost” in my Windows/system 32/drivers/etc folder. (My OS is Windows XP Pro) Instead I have the following list in the “etc” folder:


    Any suggests on how to use your block directions with this list? (Disregard my previous comment about “unblocking” a site).


  9. Rakshit says:


    Search for file name “host”, inside that file you will find “ localhost”. It may be hidden as well.

  10. Chrys says:

    Thank you, Rakshit for the suggestion.

    There are a number of files on the intended (targeted) computer with “host” in the name. I did a search on the targeted computer for “ localhost” but it turned up no such file. However, I tried another computer with XP Pro and it DID have a “host” folder and “ localhost” file in that folder.

    Now, the intended(targeted)computer for the one-site block has only Service Pack 2 installed. But the other computer (with the “ localhost” file), has Service Pack 3 installed.

    Could that be the difference in the absence of that “localhost” file? The difference in Service Packs installed?


  11. Rakshit says:


    First of all “hosts” is the name of the file not the folder. Please refer to the screenshot above.

    Ok, let’s start from the first step. When you typed
    notepad %windir%\system32\drivers\etc\hosts in the run command, were you not able to see the file named “hosts” getting opened in notepad?

    If not, then copy the hosts file from other computer to your targeted computer at the location %windir%\system32\drivers\etc

  12. jai says:

    sir i had lost my host file . i deleted my host file . can i regain them.sir plz tell meeeeeeee plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

  13. Peter Jay says:

    My family also have a same situation. Lol..
    I know what u mean Rakshit. Anyway, thanks. I very helpful sharing..
    .-= Peter Jay´s last blog ..Our Very Very Own BRC Toolbar =-.

  14. Noel says:

    Good day!

    How can i block all website except for 3 website?


  15. mhaye says:

    bro it works for me but
    he only block one website
    how can i block 2 or more webste?

  16. elm says:

    hi! tnx, this is very useful to prevent spread of viruses to my PC,
    after i have changed from .0.1- to 0.9, wcan i changed the 2nd to the last no???tnx krakshit, i learned something from you today

  17. Ady says:

    hey brothere….. how r u ?? i tried the same thing and saved it properly but dont know why its not working please helpo me out

    .-= Ady´s last blog ..How to Recover Deleted Pictures and Files from Memory Cards =-.

  18. Bitbul says:

    Hey Rakshit
    Thanks it worked for me well. Now I want to unlock and its not still opening the site. what do I do to unlock now that my kids are back to school

  19. Vivek Doshi says:

    thanks for information…and nice blog will like 2 visit again

  20. shiv says:

    thnx bt it is nt blocking the link of tht web site….suppose it is blocking songs.pk…….thn its nt blocking songs.pk/anjanaanjani/

  21. yosef says:

    It dosen’t work by windows 7

  22. pathan khan says:

    It’s really working , and so good Thank u . For giving more information .

  23. Eliza says:

    hey I need help..it didn’t work for me..and I follow every single step they were okay but when i save it, a pop up screen shows that I should make the file name and path name correct..also instead of etc appearing, its ::1 that appears will you please help me with that problem..I will really appreciate it

  24. Carlos says:

    hello, uhmm.. how do I save it as an administrator, it keeps on saying that I should have a permission from the administrator thanks.

  25. bobbie says:


    Thanks for the info, could you possibly tell me how to unblock a website. I tried deleting what i had put in but now it won’t save the changes.


  26. judie says:

    why it;s only working at the first time???

  27. Known Stranger says:

    Dude i just love you its really working… thank You sooooooooooooooooo much u just solve my problem … its just takes couple v mints nd the site is Blocked without any massage…. Great Work hats Of…

Leave a Reply

CommentLuv badge