Block website in your PC (Desktop or Laptop Computers)

Posted by Ankur Gandhi in Common | Latest Stuffs



Hello Friends,Sometimes you want to block some websites in your PC which are harmful for your computer,Now you can easily and effectively block access to a website by adding it to your Windows HOSTS file. (Yes, Hosts is capitalized for some strange reason).It is very easy in Use and it is working effectively,below is the trick that how can you Block a website in your PC.

1.Go to your HOSTS file which is located at:
C:\WINDOWS\SYSTEM32\DRIVERS\ETC for windows Vista and XP
C:\WINNT\SYSTEM32\DRIVERS\ETC for Windows 2k
C:\WINDOWS for Windows 98 and ME

2. Open HOSTS with Notepad.

The default Windows HOSTS looks like this:
______________________

# Copyright © 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a “#” symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
#
127.0.0.1 localhost
_____________________________

3. Directly under the line that says 127.0.0.1 Localhost, you will want to type:

127.0.0.1 name of the URL you want to block

For example to block the MySpace.com homepage (highly recommended!), simply type:

127.0.0.1 myspace.com
127.0.0.1 www.myspace.com

Other parts of MySpace could be blocked in a similar way:

127.0.0.1 search.myspace.com
127.0.0.1 profile.myspace.com
etc etc etc…

You may need to add sites with both with and without the “www.”. Test after blocking to make sure you got it right.

You can add as many sites as you wish to block in this fashion. I, myself, have over 12000 undesireable and dangerous sites in my personal HOSTS file!

4. Close Notepad and answer “Yes” when prompted.

5. Reboot your computer and attempt to access your now blocked website. You should see a Cannot find server or DNS Error saying: “The page cannot be displayed”.

If you like my posts then please comment on it and if you want to get updates with my posts and want to share your knowledge or write your posts on HackingEthics.com then you can Register Here.

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

  • http://www.netforsolutions.com/ Mike

    Hi

    Thanks ..

    But is this really helpfull and safe .. i m scared in changing wondows file ..

    Please confirm me what to do

    Regards
    Mike

    • http://hackingethics.com/ Ankur Gandhi

      Hello Mike,Thank you for commenting on My site Hacking Ethics.I m Ankur.I want to told you that you can change your windows file without any hesitation.I m using with my computer and i have added thousands of links in this file.It is working very fine.So you can change your windows file.My gmail id is anku.gandhi@gmail.com, You can add me and if you want help me you can get me on this id any time Thank you again

  • http://www.netforsolutions.com Mike

    Hi

    Thanks ..

    But is this really helpfull and safe .. i m scared in changing wondows file ..

    Please confirm me what to do

    Regards
    Mike

    • http://hackingethics.com Ankur Gandhi

      Hello Mike,Thank you for commenting on My site Hacking Ethics.I m Ankur.I want to told you that you can change your windows file without any hesitation.I m using with my computer and i have added thousands of links in this file.It is working very fine.So you can change your windows file.My gmail id is anku.gandhi@gmail.com, You can add me and if you want help me you can get me on this id any time Thank you again

  • Jenkins

    Hi. I tried you method and evertime I try to save it won’t let me. It says something about the file can’t be changed or something. I’m following the steps exactly the way you explained. What do I need to do?

  • Jenkins

    Hi. I tried you method and evertime I try to save it won’t let me. It says something about the file can’t be changed or something. I’m following the steps exactly the way you explained. What do I need to do?

  • Ramkumar.S

    how do block some website in destop or server

  • http://www,sify.com Ramkumar.S

    how do block some website in destop or server

  • pratiekk

    i am not able to save my host file in the sam e directory

  • pratiekk

    i am not able to save my host file in the sam e directory

  • K-E-N-N-Y

    I have an error that says, “Cannot create the C:WindowsSystem32driversetchosts file.”

    Make sure that the path and file name are correct.

    I tried looking and searching to solve this problem but, it won’t save at all.

  • K-E-N-N-Y

    I have an error that says, “Cannot create the C:\Windows\System32\drivers\etc\hosts file.”

    Make sure that the path and file name are correct.

    I tried looking and searching to solve this problem but, it won’t save at all.

  • Anooppvkeloth

    is there any other method..this method knows all other including childrens

  • Avaneesh3006

    sir how can i rotate the desktop background circularly 

  • Ravi

    most yahoo logins and facbook sights are not get blocked with this way. Please suggest if you know any other mthod to block these sites.

  • Pingback: Block websites on your desktop | Free 101 Articles

  • Pingback: Ezekiel