“Fix Tech Daily helps you solve real-world IT problems, with daily tips on Windows, Office, networks, and devices.”
Friday, July 25, 2025
How to Block a Website on Windows PC – Step-by-Step Guide (No Software)
🔐 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:
Open Notepad as Administrator:
Search for Notepad > Right-click > Run as Administrator
Go to File > Open and navigate to:
C:\Windows\System32\drivers\etc
Select All Files from the dropdown
Open the file named hosts
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
Save and close the file
Restart your browser or PC
🎉 Now those websites will be blocked!
🔧 Method 2: Use Windows Firewall
Open Control Panel > Windows Defender Firewall
Click Advanced Settings > Outbound Rules > New Rule
Select Program > Browse to browser EXE (e.g.,
chrome.exe
)Choose Block the connection
Apply the rule for specific profiles (Domain, Private, Public)
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