How to Temporarily Block Time-Wasting Websites

H

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: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(“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.

📮  Subscribe to our Email Newsletter for Google tips and tutorials!

Looking for something? Find here!

Meet the Author

Web Geek, Google Developer Expert
A
Amit Agarwal

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. He is the developer of Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Get in touch

Google Add-ons

Do more with your Gmail and GSuite account
G

We build bespoke solutions that use the capabilities and the features of Google Workspace for automating business processes and driving work productivity.

  1. Mail Merge with Attachments
    Send personalized email to your Google Contact with a Google Sheet and Gmail
  2. Save Emails and Attachments
    Download email messages and file attachments from Gmail to your Google Drive
  3. Google Forms Email Notifications
    Send email notifications to multiple people when a new Google Form is submitted
  4. Document Studio
    Create beautiful pixel perfect documents merging data from Google Sheets and Google Forms
  5. Creator Studio for Google Slides
    Turn your Google Slides presentations into animated GIFs and videos for uploading to YouTube