HOW TO BLOCK
WEBSITES ON WINDOWS

All working methods: from manual editing of system files to installing a professional blocker in 1 minute.

google.com

SITE
BLOCKED

Your attention is saved

Why and who needs this?

The ability to restrict access to distracting resources is a key skill for productivity and security.

Combating procrastination

Disabling access to social networks, news, and entertainment portals while working or studying.

Parental control

Protecting children from adult content, gambling, questionable sites, and cyberbullying.

Corporate security

Restricting employee access to malicious or non-work-related resources on work PCs.

Step-by-step setup

Choose the most suitable blocking method for you.

1

Method using the hosts file

Built-in Windows method. Redirects requests to the site to your own computer (localhost), making the resource unavailable. Does not require installing third-party programs.

Run Notepad as administrator
Open Notepad in a convenient way for you:
(necessarily with administrator rights)
  • Option 1 (via Search): Click "Start" or click on the search bar at the bottom of the screen, type "Notepad", right-click on it and select "Run as administrator".
  • Option 2 (Create a new document): Right-click on the desktop → "New" → "Text Document"
    (and open it as administrator).
Open file: C:\Windows\System32\drivers\etc\hosts
In Notepad, click "File" -> "Open". Paste the path C:\Windows\System32\drivers\etc\ into the window's address bar or navigate through the folders manually. In the bottom right corner, be sure to switch the filter from "Text Documents (*.txt)" to "All Files (*.*)" to see the hosts file. Select it and click "Open".
Add the line: 127.0.0.1 целевой_сайт.com
Lines with a # at the beginning are Windows comments, they don't need to be changed. Scroll the file to the very bottom and type the block on a new line following the rules:
  • There must be a space between 127.0.0.1 and the site address.
  • Add the site address without https:// or http://.
  • It is recommended to specify both the domain (tiktok.com) and the version with www. (www.tiktok.com), each on a new line.
  • Finally, save the file by pressing Ctrl + S.
Save the file and restart your browser
Click "File" -> "Save" (or the Ctrl+S shortcut). If the system asks you to save the file as a new text document in "My Documents" — it means you forgot to run Notepad as administrator. After saving, close all browser windows and open them again for the changes to take effect.
Disadvantages: Requires time for manual setup, the restriction is easily removed if you have administrator rights, and some site versions may bypass the block (difficulty dealing with subdomains and HTTPS traffic).
hosts — Notepad
FileEditFormatViewHelp
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#

127.0.0.1 localhost
::1 localhost

# Blocking distracting sites
127.0.0.1 tiktok.com
127.0.0.1 www.tiktok.com
Open
Desktop
Documents
Pictures
This PC
Videos
Downloads
Name Date modified Type
hosts 07.12.2019 14:12 File
lmhosts.sam 07.12.2019 14:12 "SAM" File
networks 07.12.2019 14:12 File
protocol 07.12.2019 14:12 File
services 07.12.2019 14:12 File
2

Blocking via router

If you need to block a site on absolutely all computers and phones on your home network, configure filtering at the router level.

Go to router settings (usually 192.168.1.1)
Open your browser and enter 192.168.1.1 or 192.168.0.1 in the address bar (the exact address is on the sticker on the bottom of your router). Press Enter to go to the device settings page.
Log in as administrator
Enter your login and password. By default, it's usually admin / admin (you can also check the sticker on the bottom of the router). If you changed the password during setup, enter your current password.
Найдите раздел Parental control или Фильтрация URL
Интерфейс роутеров отличается в зависимости от производителя (TP-Link, Asus, Keenetic и др.). Обычно нужные настройки находятся во вкладках «Безопасность» (Security), «Parental control» (Parental Control), «Брандмауэр» (Firewall) или «Контроль доступа» (Access Control).
Add the required domains to the blacklist
Enable the filtering function, create a new rule and enter the site address you want to block (for example, youtube.com). Save the settings and reboot the router (this usually happens automatically after applying).
Disadvantages: Setup differs significantly across models, and advanced users can easily bypass the block using a VPN.
Google
Authorization
Login: admin
Password:

Router Settings

admin | Log out
Network
Wi-Fi
System

Network Status

Internet connection: Established
WAN IP address: 100.72.34.12
Uptime: 14 d. 3 h.

The fastest option

If you don't want to dig into system files or configure complex routers, use Web Blocker. Installation takes 60 seconds and works immediately.

Instant installation and blocking
All features are free and require no registration. Sites are blocked in 1 click. Just add a site and install the extension in one click.
Protection against disabling and bypassing
Unlike other harder-to-configure methods that can be easily disabled in a few clicks, password protection and thoughtful discipline mechanisms will maintain your restrictions.
100% privacy and local storage
All personal data, site lists, and passwords are stored exclusively on your device. The extension works autonomously, does not collect browser history, and does not transmit information to third-party servers.

Web Blocker

3
tiktok.com
+ADD
YOUTUBE.COM
INSTAGRAM.COM

Stop getting distracted
— regain control!

Block your first distracting site in just 1 minute.

Block a site in 1 minute →