how to block unwanted site on your computer

By -

So, you are worried that your kids are playing too much games in a particular site or you just want to block few site on your computer or whatever your reason may be, here is a way. Pleas note that this process will block the site on single computer where this process was done.

It is easy to block a website on a computer using any software or just by changing the DNS server and changing few settings but if you don’t want to use any additional software or service then in this case too, you can block websites on your Windows machine. All you will require for this is :

1. A windows machine

2. A text editor (notepad will do)

3. A web browser

Just follow the steps given below to block a particular website.

1. Go to C:\WINDOWS\system32\drivers\etc

2. Find the file named “HOSTS”

3. Open it using notepad.

4. Under “ localhost” Add , and that site will no longer be accessible.

5. Done!

E.g. localhost

– will not be accessible anymore.

If you want to add more sites then just increment the IP address by one and add it to the list.

i.e. (if you want to block yahoo) (if you want to block msn) (if you want to block google) (if you want to block facebook)

127.0.07 (if you want to block youtube)

You can use this trick to block popup sites as well or any other advertising site.

Block websites using TP-Link Router

If you have a TP-Link router, you can block any website you want from your network. This is a great way of controlling the traffic on your network. Here is a step by step instruction in blocking websites using your TP-Link router

1. Go to and login to your router admin panel.

2. Go to Access Management (you can find this in top navigation menu)

3. Now go to Filter

4. In Filter Type Selection select URL Filter

5. Now change radio button Active to Yes

6. Choose proper URL index (its a dropdown selection menu)

7. In URL input field type the URL you want to block.

8. Once above step is done click on save button.

9. Now restart your router by saving the current setting.

That’s it. Now no one in your network can view the site you have added to the URL filter list. This is a great way of blocking website for entire network. Other router will also have similar type of setting. Just browse around you router setting and I am sure you will find a setting similar to the one I have mentioned above. 

If you have access to router I recommend that you block websites using router rather than the host file.


Hi, I am Suman Bhattarai and I am a novice coder and love to blog about things I like. If you like my posts, don't forget to comment, subscribe or follow me on or other social networks.

1 Comment to how to block unwanted site on your computer

  1. allindiainstitutions

    I truly appreciate you taking the time to post this. I really liked reading it and am
    looking forward to more posts from you! Keep em coming.