Friday, July 25, 2025

How to Block a Website on Windows PC – Step-by-Step Guide (No Software)













Want to block distracting or harmful websites on your Windows 10 or 11 PC without using any third-party software? Whether it's for productivity, parental control, or network security, blocking websites can be done easily using built-in tools. Here's a simple step-by-step guide.

🔐 Why Block Websites?

  • Prevent access to adult or malicious content

  • Block social media or distractions during work hours

  • Control web usage for children or employees

🛠️ Method 1: Block Websites Using the Hosts File

✅ Step-by-Step:

  1. Open Notepad as Administrator:

    • Search for Notepad > Right-click > Run as Administrator

  2. Go to File > Open and navigate to:

    C:\Windows\System32\drivers\etc
    • Select All Files from the dropdown

    • Open the file named hosts

  3. At the bottom of the file, add lines like this:

    127.0.0.1 facebook.com
    127.0.0.1 www.facebook.com
    127.0.0.1 youtube.com
    127.0.0.1 www.youtube.com
  4. Save and close the file

  5. Restart your browser or PC

🎉 Now those websites will be blocked!

🔧 Method 2: Use Windows Firewall

  1. Open Control Panel > Windows Defender Firewall

  2. Click Advanced Settings > Outbound Rules > New Rule

  3. Select Program > Browse to browser EXE (e.g., chrome.exe)

  4. Choose Block the connection

  5. Apply the rule for specific profiles (Domain, Private, Public)

  6. Give the rule a name and click Finish

You can now block web access per program (e.g., Chrome) at certain times or for certain users.

❗ Important Notes

  • This method doesn’t work with HTTPS-only websites in all browsers — use firewall for stronger rules

  • Anyone with admin access can undo the changes