Home » NETWORK HACKS, VISTA HACKS, XP HACKS

How to Block a Website ?

Submitted by Srikanth on Saturday, 5 January 200825 Comments

Some times it becomes necessary to block a website on our Computers for one or other reason.You can easily and effectivily block access to a website by adding it to your Windows HOSTS file.Once the website is blocked in the HOSTS file,it will not appear in any of the browsers.That is,the website becomes completely unavailable.
 

 

1.Go to your HOSTS file which is located at:

C:\WINDOWS\SYSTEM32\DRIVERS\ETC for Vista and XP
C:\WINNT\SYSTEM32\DRIVERS\ETC for Win 2000
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 website MySpace.com, 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…

It is necessary to add a website with and without the “www.”. You can add any number of websites to this list.

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

5. After blocking the website, test it in any of the browser.If every thing is done as said above,the website must not appear in any of the web browsers. You should see a Cannot find server or DNS Error saying: “The page cannot be displayed”.I have also created a virus to block a website which automatically blocks a list of websites as specified in the source program.

Some people suggest that your add a website to the Internet Explorer ‘Privacy’ settings. This does not block a site. It only stops that site from using cookies.

Popularity: 3% [?]

  By using/following this site you agree to our Legal Disclaimer

Subscribe to GoHacking.Com


Enjoyed this article?
Subscribe to GO HACKING and get daily updates in your email for free

25 Comments »

  • Himanshu said:

    thanks bro..! can you give names of some harmful website that harms our computer security?

  • Srikanth (author) said:

    @ Himanshu

    Most of the porn sites and crack sites hurts your computer security & privacy…

  • SaGaR said:

    very gud piece of info…keep up the gud work dude…

  • iRDX said:

    hmm… just a thought… if i pinged the site, would it work? answer: no. i think…
    and if i typed in the site’s ip address in the address bar, or some other obfuscated way of changing a website’s name, will it work? i dont think this hack would work then…
    anyways. nice hack. love the site…

  • jatin said:

    i m block its doing good but when i m erase that name after that the site still doesnt work

  • jatin said:

    hooooooooooo its work when i restart the computer goo dtrick thanks bro

  • Srikanth (author) said:

    @ jatin

    Restart and try. It should work!

  • mak said:

    can u tell me how to unblok a site 4m mah coleg ,,
    actually d problm is i m able to unblock the site but they also block the files to download…. tat by extension..
    i.e. .mpg4,.mp3….. ect r blok 4 downloding .whenever i click to download .an error occure in web page ..tat of hosting n all..
    but all oder extnsion get downlodeded expt mp4,mp4 ..
    plz hlp

  • melissa said:

    i have tried to do this with my vista and it’s not working. everytime i type in the website like you say to .. i don’t get a “yes” prompt i get a “save, don’t save and cancel” prompt… when i click “save ” another window opens and says.. “can not create the C:\Windows\Systems32\drivers\ect\hosts file.”
    and then it takes me to another thing.
    what am i doing wrong?
    i did it exactly like it says to on this site. but i never get the “yes” prompt.
    thanks
    melissa

  • Srikanth (author) said:

    @ melissa

    Plz check the following.

    1. Login as an administrator and ensure that you have full rights to modify the file.

    2. Also make sure that the file is not read-only.

  • RVM said:

    Hi,

    I did followed all the steps what you said but after the 4th step i.e ” 4. Close Notepad and answer “Yes” when prompted” I clicked yes when prompted but it gave a message “Make sure file name & path is correct.
    The file is read only attribute.Use different file name.” What’s the reason?

  • Srikanth (author) said:

    @RVM

    before modifying the hosts file, right click on it, goto properties and uncheck the option Read-Only. Then follow all the steps.

  • rexter said:

    it’s not working…
    i’m using a proxy server…
    is it a problem???
    do u know abt “host redirection”???
    i also tried this…
    but it’s not working…
    help me…

  • Kranti said:

    how to create virus for blocking sites using batch file…….???

    is it possible to hack anybodies database IP without using any SOFTWARE ?

  • Phriekspeed said:

    I followed all steps and closed in notepad.before doing so,I right clicked on host went to prop and made sure it wasn’t set to read only and I got the “make sure file name and path is correct”…whtz up? Also,there is more written under the 127… local host numbers.so,where do start to type at?

  • basanio said:

    man gaye yaar kya trick hai

  • ashutosh srivastava said:

    thankx for this great tip

  • Dhaval said:

    Thanks bro for all info..its all good…sry best….its the best site for hacking…

  • brijbadal said:

    thanks its working bro

  • muthuraja said:

    i cant block the website in college hostel system y its connected in college server can i do this

  • Abhishek kumar said:

    this is the very atteractive site for virus.

    i am very impress to this site.

    thank

  • sas said:

    Actually i have tried this .but i can’t save the changes made by me to c\windows\system32\driver\etc.it is asking for administrator permission though i have logged in as administrator oly .what to do
    please reply .thanks in advance.

  • Sadashiv Gour said:

    great sirji…………i m big fan of urs

  • Vi said:

    cool work…superb!!

  • aticul said:

    hey,,your site is very useful, i tried it in my pc and it works! thanks srikanth

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

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

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.