The main ways to block a webpage
You can block a webpage at three different levels: on a single browser, across all browsers on one device, or on your entire home network. Browser-level blocking is fastest and works immediately — you install an extension and it stops that site from loading. Device-level blocking requires changing your system settings and affects everything you use. Network-level blocking happens at your router and stops the site for everyone connected, which is useful if you're managing a household or office.
The method you choose depends on whether you want to block a site just for yourself, for a specific device, or for everyone on your network. Browser blocking is reversible in seconds. Device and network blocking require more steps to undo, so they're better for long-term restrictions.
Key Takeaways
- Browser extensions like uBlock Origin, Freedom, or Cold Turkey block websites instantly and can be turned off by uninstalling the extension.
- Device-level blocking through your operating system's parental controls or hosts file affects all browsers but requires system access to change.
- Router-level blocking stops a website for everyone on your network and is the hardest method to bypass without the router password.
- Blocking a site on your own device is straightforward; blocking it for others requires either their device access or control of the network.
Blocking websites in your browser
The easiest method is a browser extension. uBlock Origin is free and works in Chrome, Firefox, Edge, and Safari. Install it from your browser's extension store, then right-click any webpage and select "Block this site" or use the extension icon to block specific elements. The site won't load the next time you visit.
Freedom and Cold Turkey are paid apps that block websites on a schedule — you can set them to block social media during work hours, for example. LeechBlock NG (free, Firefox and Chrome) lets you set time-based rules: block Reddit between 9 a.m. and 5 p.m., or block YouTube entirely on weekends. These extensions work only in that browser, so if you use Chrome and Firefox, you'll need to set rules in both.
To remove a block, uninstall the extension or open its settings and remove the site from the blocked list. This takes about 30 seconds.
Blocking websites on Windows or Mac
To block a site across all browsers on your computer, you can edit your hosts file. This is a system file that tells your device which web address goes to which server. By adding a line to it, you can redirect a website to a fake address so it never loads.
On Windows, open Notepad as administrator, then open the file at C:\Windows\System32\drivers\etc\hosts. Add a new line at the bottom: 127.0.0.1 facebook.com (replace facebook.com with the site you want to block). Save the file. The site will no longer load in any browser on that computer.
On Mac, open Terminal and type: sudo nano /etc/hosts. Enter your password. Add the same line: 127.0.0.1 facebook.com. Press Control+X, then Y, then Enter to save. Restart your browser.
To unblock, open the hosts file again and delete the line you added. This method requires you to know how to edit system files, so it's less convenient than a browser extension but harder to accidentally undo.
Using parental controls to block websites
Windows and Mac both have built-in parental controls that can block websites without editing files. On Windows 11, go to Settings > Family > Family safety > Screen time, then add a Microsoft account for the person whose access you want to limit. Under "App and game filtering," you can block specific websites.
On Mac, go to System Settings > General > Parental Controls, select the user account, then click "Content" and add websites to the restricted list. These controls require the administrator password to change, so they're harder to bypass than browser extensions.
Both systems also let you set time limits on device use, which is useful if you want to block a site only during certain hours rather than permanently.
Blocking websites at your router
To block a website for everyone on your home network, log into your router's admin panel. Open a web browser and type your router's IP address — usually 192.168.1.1 or 192.168.0.1 — then enter your router's username and password (often "admin" and "admin" or "admin" and the password on the back of the router).
Look for a section called "Parental Controls," "Access Control," "Website Filtering," or "Content Filtering." Add the website's domain name to the blocked list. The exact steps vary by router brand — Netgear, TP-Link, and Linksys all have different menus — so check your router's manual if you can't find the option.
Once you save the changes, that website won't load on any device connected to your network, including phones and tablets. To unblock it, log back into the router and remove it from the list. This method is the hardest to bypass because it blocks the site before it reaches any individual device.
Blocking websites on your phone
On iPhone, go to Settings > Screen Time > Content & Privacy Restrictions > Restricted Websites. Add the website you want to block. This requires your Screen Time passcode to change, so it's secure if you're the only one who knows it.
On Android, the process varies by phone manufacturer. Samsung phones have a built-in "Parental Controls" app in Settings. Google Pixel phones don't have a native option, so you'll need to use a browser extension (if you use Chrome) or a third-party app like AppBlock or Freedom. Both are paid but let you block websites and apps on a schedule.
If you want to block a site for someone else's phone, you'll need access to their device to set it up, or you can block it at the router level so it's blocked across all devices.
What happens when you try to visit a blocked website
If you block a site with a browser extension, you'll see a message from the extension saying the site is blocked. If you block it in your hosts file or router, you'll see an error message like "This site can't be reached" or "Connection refused." The page simply won't load.
Some blocking tools let you set a custom message or redirect to a different page instead. For example, Cold Turkey can show a motivational message when you try to visit a blocked site, or redirect you to a productivity app. This is useful if you're trying to break a habit rather than enforce a hard rule.
Frequently Asked Questions
Can someone unblock a website I blocked on my router?
Only if they know your router's admin password. If you're the only one who knows it, they cannot unblock the site without your help. If you share the password with others in your household, they can log in and remove the block themselves.
Will blocking a website at my router affect my internet speed?
No. Blocking happens instantly at the router level and doesn't slow down any other traffic. The only delay you'll notice is the extra second it takes for your device to realize the site is blocked and show an error message.
Can I block a website on my work computer?
That depends on your company's policies. If your work computer is managed by your IT department, they may have already blocked certain sites, and you won't be able to change those settings yourself. You can install a browser extension on your personal device, but not on a work computer without permission.
What's the difference between blocking a website and clearing my browsing history?
Blocking prevents a website from loading at all. Clearing history removes the record that you visited it, but the site still loads if you try to visit it again. They serve different purposes — blocking is about preventing access, and clearing history is about privacy.
If I block a website, will the website know I blocked it?
No. The website has no way to know whether you blocked it or simply chose not to visit. From the website's perspective, you just never made a request to it.