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 – – 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:You 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(“”, ””, “”)

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

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory


Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

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

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

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

We will never send any spam emails. Promise.