🚫 SiteBlocker – A Simple Website Blocker for Windows (Python + GUI + .exe)
Mahmudur Rahman

Mahmudur Rahman @mahmud-r-farhan

About: Full Stack Developer

Location:
Bangladesh
Joined:
Sep 24, 2024

🚫 SiteBlocker – A Simple Website Blocker for Windows (Python + GUI + .exe)

Publish Date: Jun 25
1 0

Tired of distractions while working? Want to prevent access to specific websites from your Windows machine?

I built a small utility app called SiteBlocker that lets you easily block or unblock websites using a graphical interface — and yes, it's packaged as a standalone .exe` for Windows!

SiteBlocker Screenshot


🧠 What It Does

SiteBlocker.exe modifies your system’s hosts file to redirect unwanted domains to 127.0.0.1. That means blocked websites won't load in any browser on your computer.

No command line, no config files — click to block or unblock.


🔧 Features

  • ✅ Block websites by entering the domain (e.g., facebook.com)
  • ✅ View all currently blocked websites
  • ✅ Unblock any selected website from the list
  • ✅ Clean, simple GUI (built with Tkinter)
  • ✅ Built as a single .exe using PyInstaller

Download

  1. Download executable file: https://github.com/mahmud-r-farhan/site-blocker/releases/download/v1.0.1/SiteBlocker.exe

  2. Github

    GitHub logo mahmud-r-farhan / site-blocker

    A simple desktop tool to block or unblock websites on a Windows machine using a graphical interface.

    🛡️ Website Blocker (Windows)

    A simple desktop tool to block or unblock websites on a Windows machine using a graphical interface. It works by modifying the hosts file to redirect unwanted domains to 127.0.0.1.

    Built with Python + Tkinter, packaged into a .exe with PyInstaller.


    Features

    • ✅ Block any website (e.g., adult website, youtube.com)
    • ✅ View currently blocked websites
    • ✅ Unblock websites easily
    • ✅ Simple GUI, no terminal needed
    • ✅ Single .exe file with icon

    How It Works

    This app modifies the Windows hosts file:

    
    C:\Windows\System32\drivers\etc\hosts
    
    

    It maps domains to 127.0.0.1, effectively blocking them:

    
    127.0.0.1 facebook.com
    
    

    Installation

    1. Right-click the .exe and choose "Run as Administrator".
    2. Use the buttons to:
      • Block new websites
      • Unblock selected websites
      • View the current list

    🛠 Build It Yourself (For Developers)

    Make sure Python 3.x is installed and added to PATH.

    1. Install dependencies:

    pip install pyinstaller
    
    Enter fullscreen mode Exit fullscreen mode

    2. Prepare the


Follow for more

Comments 0 total

    Add comment