How to Temporarily Block Time-Wasting Websites

You have certain important tasks to complete in the next hour or so and yet you have trouble staying focused for long because of all these online distractions coming through Twitter, Facebook, YouTube and other websites.

It maybe slightly unfair to categorize some of these sites as “time wasting” but at the same time, the endless stream of new content available on these sites can consume lot of your precious time before you even realize it.

LetMeWork - A Toggle Switch for the Time-Wasting Web

If you have trouble exercising self-discipline and can’t seem to stop yourself from constantly checking your social sites and email accounts for new updates, here’s an easy solution.

Download and unzip the file – LetMeWork.zip – to your desktop and double-click it to instantly block some of the distracting sites on your computer. When you are done with your work, double-click the same file again to unblock access to all the sites as before.

PS

may see a User Access Control warning dialog in Windows Vista or 7 – just say yes.

How the script blocks and unblocks websites

The standard way for blocking any site on your computer is through the HOSTS file that’s available in the Windows directory.

It does take some effort to edit the HOSTS file and what the above script (source code) does is hide all the complexity from the user and lets you block as well as unblock sites with a click.

The list is customizable. You may open the vbs file in notepad and edit the WebsitesToBlock array to include any other website(s) in the banned list.

WebsitesToBlock=Array(“twitter.com”, “www.youtube.com”, “facebook.com”)

There are some browser extensions that seem to solve the same problem but this script is run-once, use-everywhere. You execute it from the desktop and it will block /unblock access to select sites across all browsers.

Amit Agarwal is a web geek, solo entrepreneur and loves making things on the Internet. Google recently awarded him the Google Developer Expert and Google Cloud Champion title for his work on Google Workspace and Google Apps Script.

Awards & Recognition

Google Developer Expert

Google Developer Expert

Google awarded us the Developer Expert title recogizing our work in Workspace

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional title for 5 years in a row

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator award for technical expertise

Want to stay up to date?
Sign up for our email newsletter.

We will never send any spam emails. Promise 🫶🏻