Results

See more...

Best Way To Block Any Website Without Any Software

Although there are number of  softwares which may help you to block any website any where but yet the best way is to do it without any software because its free, simple and most of all you are not dependent on any software. All you have to do is to edit windows HOSTS file to block a website. After website is blocked, you wont be able to access it in any web browser even by using any software.

The main purpose of HOSTS file is to maintain personal list of web addresses. Whenever you type want to open a website, its URL is first matched to the list in HOSTS file, if found you will be directed to that IP without first consulting a DNS [Domain Name Server]. We will use the this principle to redirect the URL you want to block to your router's adderess or any other website you want to open instead of that website.

Follow these simple steps:

  1. Open Windows->system32->drivers->etc or if your Windows is installed in C: drive simply type the following address in your address bar.
  2. C:\WINDOWS\system32\drivers\etc

    HOSTS File Location

  3. Double click on hosts file and select notepad from the list.
  4. Open With List

  5. Now your hosts file would look like the screenshot below:
  6. Default Hosts File

  7. Suppose i want to block a website with URL www.youtube.com and the IP addess of my router is 192.168.1.1, all you have to do is to add a new line to your hosts file, write the IP address of your router followed by the website you want to block. In our case, adding the following line to HOSTS file will do the work
  8. 192.168.1.1 http://www.youtube.com
    192.168.1.1 http://youtube.com

  9. Now your hosts file would look like this:
  10. Modified Hosts File

  11. What we exactly did is that we redirected youtube.com to our router's configuration page. Remember you can also replace your router's IP addess with the IP address of any other website for example IP address of google.com. In that case when a person will try to open youtube.com, he will be redirected to Google.com.
  12. Router-Configuration-Page

  13. You can find Google.com IP address from using this command over your DOS
  14. ping www.google.com

  15. Save HOSTS file [Ctrl+S].
  16. Restart your system.

I have tested this procedure on my PC. I was not able to open the website i blocked on Internet Explorer, Mozilla Firefox and Google Chrome. All of these three browsers opened the configuration page of my router whenever i tried to access the blocked website.

Contact Us for News Tips, Corrections and Feedback

Related posts

5 comments
Leave a message...

  •  
    Kizee3 years, 3 months ago

    i Did that but my antivirus wont allow.any trick around?

  •  
    mia4 years, 7 months ago

    I do not have a router
    What can I do for an alternative?

  •  
    ankush6 years ago

    Sorry dude, but i tried this technique it didnt work for me. Opera, Mozilla opened it with charm:(. Love to hear from you. I got my router ip address by typing ipconfig in DOS.

    •  
      Wolverine6 years ago

      I have tested the method myself on Windows XP, Vista and 7. Can i view your HOSTS file contents?

  •  
    mr kopiko6 years, 11 months ago

    thanks a lot =)