Are you facing situations like, you have certain tasks to complete, but sometimes you start using time-wasting sites. This could harm your productivity and at times even put you in dangerous situations if you get caught at your workplace. Do you want to rid of this problem? Definitely yes, right?

In this tutorial you will learn how to block websites temporarily to increase your productivity and finish your tasks without any distractions.

You don’t have to do much to block websites. You just have to locate one file in your computer i.e “HOSTS” file. Then just add the name of websites at the end of the file and save the file. Here’s is the step-by-step guide to block websites.

Step 1: Open any text editor as administrator. (It is important to run it as administrator.)

open notepad as administrator

Step 2: Open the “hosts” file. You can locate it using the direction given below:

c:\WINDOWS\system32\drivers\etc\

hosts file location in windows

Step 3: Insert desired website address at the end of the file as shown below.

127.0.0.1 twitter.com
127.0.0.1 myspace.com
127.0.0.1 facebook.com
127.0.0.1 youtube.com

hosts file in notepad

Step 4: Save the file and exit. That’s all.

Now nobody can open the websites you have added in the list on your computer. If somebody tries to open one of the websites from the list, then s/he will get an error as shown below.

twitter website blocked by hosts file

If you want to remove this restriction, then simply remove the lines which we just added in the file in Step 3 and the sites will start working normally.

This is a very simple and small trick, but very useful because by using this you can restrict other users to open unnecessary websites on your computer without installing any software. You can also stay focused on your work without any distractions.

If you find any problem regarding above trick then feel free to ask in the comment section. We will be glad to help you.

Enjoy and Stay Techie…

About Parth Kheni

Avatar for Parth KheniA Computer Engineer by profession, Parth Kheni is the Founder of TechMuzz. He is an ardent techie and crazy about gadgets. He feels that the apt use of technology simplifies the life to a great extent and thus wishes to take it at every doorstep.

Pin It on Pinterest

Share This