Summary
How to block websites on work computers depends on scale: for one machine, edit the hosts file; for an office network, use DNS or firewall filtering; for managed browsers, push the Chrome or Edge URLBlocklist policy through Group Policy, Intune or the Google Admin console; and for remote teams, use endpoint rules from a monitoring or security agent. Each method works at a different layer, so the right choice depends on whether devices leave the office network and who manages them. Block security risks such as malware, phishing and unapproved file-sharing sites without hesitation. Be more careful with productivity blocking: broad bans on news or social media often push activity to phones and damage trust, while a non-blocking nudge plus a clear acceptable use policy usually changes behavior with less friction.
E-Monitor's internet usage monitoring lets you set allow and block rules per organization, team or role, show non-blocking policy nudges, and alert on blocked categories. Start free →
Why Businesses Block Websites
Website blocking for business means preventing work devices or work accounts from loading specified domains or categories of sites. Organizations do it for three different reasons, and the reason should decide the method:
- Security. Stopping access to known malware, phishing, newly registered domains and sites that host malicious downloads.
- Data protection. Preventing uploads to personal cloud storage, file-transfer sites and unapproved AI tools, which is a common route for company data to leave. See our shadow IT detection guide for the wider problem.
- Productivity. Limiting distracting sites during work hours. This is the most common request and the one most likely to backfire if handled bluntly.
Security and data-protection blocks are rarely controversial. Productivity blocks need more thought, which is covered later in this guide.
How to Block Websites on Work Computers: 6 Methods Compared
| Method | Where it works | Pros | Cons |
|---|---|---|---|
| Hosts file | One device | Free, no software, works in every browser | Manual per machine, easy for admins to undo, no wildcards, no reporting |
| Router or DNS filtering | Office network | Covers every device on the network, category lists available | Stops working when laptops leave the office or use another DNS resolver or VPN |
| Firewall or secure web gateway | Network or cloud proxy | Strong control, category and threat feeds, logs | Cost and complexity; remote users need an agent or tunnel |
| Group Policy or Intune browser policy | Managed Windows and Mac devices | Centrally managed, follows the device anywhere | Only covers managed browsers; other browsers need their own policy or must be blocked |
| Chrome Enterprise URLBlocklist | Chrome on managed devices or signed-in profiles | Cloud-managed from the Google Admin console, works on Chromebooks | Chrome only; per-browser management |
| Monitoring or endpoint agent rules | Each device with the agent | Works on and off the network, rules per team or role, reporting and alerts | Needs agent deployment and disclosure to employees |
Most organizations combine two layers: DNS or gateway filtering for security categories, and browser policies or agent rules for anything that should follow the device. Our comparison of web filtering vs employee monitoring explains how those two tool types differ.
How to Block a Website With the Hosts File
This is the quickest fix for a single machine, such as a shared kiosk.
- On Windows, open Notepad as administrator and open C:\Windows\System32\drivers\etc\hosts. On macOS or Linux, edit /etc/hosts with sudo.
- Add a line per domain pointing to 0.0.0.0, for example 0.0.0.0 example.com and a second line for www.example.com.
- Save the file and flush the DNS cache (ipconfig /flushdns on Windows).
Limitations: the hosts file has no wildcards, so every subdomain needs its own line; anyone with admin rights can remove it; and browsers using DNS over HTTPS may bypass it. It does not scale beyond a handful of machines.
How to Block Websites With DNS or Router Filtering
DNS filtering stops a device from resolving a blocked domain, so the site never loads in any browser or app. It is the most common way to protect a whole office network at once.
- Choose a filtering DNS service or use the filtering features of your firewall or router. Many offer category lists for malware, phishing, adult content and file sharing.
- Point your router's DHCP settings at the filtering resolver so every device on the network uses it automatically.
- Select the categories to block and add individual domains to custom block and allow lists.
- Block outbound DNS to other resolvers at the firewall, and decide how to handle DNS over HTTPS in browsers, or users can bypass the filter.
- Test from a few devices and review the query logs for false positives during the first week.
The weakness is coverage. Once a laptop leaves the office, it uses whatever network it joins, so remote and hybrid staff need a filtering client on the device, a browser policy or an endpoint agent instead.
How to Block Websites in Chrome and Edge With URLBlocklist
Both Chrome and Microsoft Edge support a policy called URLBlocklist, with a matching URLAllowlist for exceptions. This is the cleanest way to block websites for employees on managed browsers because it travels with the device.
Microsoft Edge via Group Policy or Intune
- Install the Microsoft Edge administrative templates (MSEdge.admx) on your Group Policy management machine, or use the Edge settings catalog in Intune.
- Go to Administrative Templates, Microsoft Edge, and open Block access to a list of URLs.
- Enable it and add patterns such as example.com, or a path such as example.com/games.
- Use Allow access to a list of URLs for exceptions, for example to allow one approved subdomain of a blocked domain.
- Apply the policy to the right organizational unit or Intune group and confirm it on a test device at edge://policy.
Microsoft's URLBlocklist documentation notes that the policy is limited to 1,000 entries, and that it does not stop a page changing dynamically through JavaScript without a reload.
Google Chrome via the Admin console or Group Policy
- For cloud-managed Chrome, open the Google Admin console, go to the Chrome browser or user settings for the target organizational unit, and find the URL blocking setting. For Windows-managed Chrome, use the Chrome ADMX templates and the same policy name.
- Add blocked URL patterns to URLBlocklist and exceptions to URLAllowlist.
- Verify on a test device at chrome://policy.
Google's URL filter format guide explains precedence: the most specific matching filter wins, and when a block and an allow filter are equally specific, the allow filter wins. Remember to block or manage other installed browsers, or the policy is easy to sidestep.
What to Block and What to Allow
| Category | Typical approach | Reason |
|---|---|---|
| Malware, phishing, newly registered domains | Block for everyone | Direct security risk |
| Personal cloud storage and file-transfer sites | Block or alert, allow the approved company service | Data loss and compliance risk |
| Unapproved AI tools | Alert or nudge, allow the approved tool | Data handling risk; employees often need an approved alternative |
| Adult content, gambling, illegal content | Block for everyone | Legal, harassment and security risk |
| Social media | Allow for roles that need it (marketing, recruiting), nudge elsewhere | Business use varies by role |
| Streaming video and gaming | Nudge or limit during work hours | Bandwidth and focus, but low risk |
| News, shopping, personal email | Usually allow | Short breaks are normal; blocking moves the activity to phones |
Base productivity decisions on data rather than assumptions. Our list of the biggest time wasters at work ranks unproductive meetings, chat notifications and tool switching above personal browsing, so a blocklist rarely fixes a productivity problem on its own.
Why Blocking Distracting Websites at Work Can Backfire
Trying to block distracting websites at work with a long blocklist creates predictable problems:
- Activity moves, it does not stop. Employees switch to personal phones, which the employer cannot see or secure.
- Legitimate work breaks. Social media blocks stop marketers posting, video blocks stop training, and every exception becomes an IT ticket.
- Trust drops. Blanket bans signal that the organization assumes misuse, which tends to hurt engagement more than a few minutes of browsing.
- The real issue stays hidden. Heavy browsing is often a symptom of unclear priorities, overload or burnout, which blocking does not address.
A non-blocking nudge often works better for productivity categories: the site still loads, but the employee sees a short reminder of the policy and acknowledges it. People correct their own habits, and managers only get involved when a pattern repeats. Reserve hard blocks for real risk.
How E-Monitor Handles Web Filtering for Employees
E-Monitor's employee monitoring software supports web filtering for employees as part of its app and website tracking, and only during clocked-in work hours. Setup follows a simple sequence:
- Set organization-wide rules. Add block rules for categories you never want on work devices, and allow rules for approved tools.
- Layer team and role rules. Allow social platforms for marketing and recruiting while flagging them for other roles. Rules can be set at organization, team or role level.
- Choose nudge or alert. For flagged domains, show a non-blocking policy nudge. The employee's one-click acknowledgment is logged.
- Turn on alerts. Use real-time alerts when a blocked category is opened or an unapproved cloud-storage domain is visited.
- Review usage reports. Check domain usage by team before tightening rules, so changes are based on evidence.
Employees can see their own activity on a personal dashboard, which makes the rules easier to accept. If you need to control when people work rather than what they browse, see our guide on how to track employee login and logout times.
Put Website Blocking in Your Acceptable Use Policy
Blocking without a written policy invites confusion and disputes. Your acceptable use policy should state which categories are blocked, which are monitored or nudged, how employees request an exception, whether personal browsing is allowed during breaks, and what happens after repeated violations. Our acceptable use policy template with monitoring includes ready-made clauses.
On the legal side, blocking a site is generally less sensitive than monitoring it, but logging browsing activity is electronic monitoring. New York, Connecticut and Delaware require advance notice of electronic monitoring, and GDPR requires transparency and proportionality in the EU. See our summary of employee monitoring laws by state. This is general information, not legal advice; confirm requirements with counsel.
Related reading: Employee internet usage monitoring software, domain-only by default., Web Filtering vs Employee Monitoring, What Is an Acceptable Use Policy?, Acceptable Use Policy Template with Employee Monitoring Clause (2026 Edition), Shadow IT Detection: How Employee Monitoring Finds Unauthorized Apps.
Frequently Asked Questions
1. How do I block websites on work computers?
For a single machine, add the domain to the hosts file. For an office network, use DNS or firewall filtering. For managed browsers, push the URLBlocklist policy through Group Policy, Intune or the Google Admin console. For remote teams, use endpoint rules from a monitoring or security agent that works on and off the network.
2. What is the URLBlocklist policy?
URLBlocklist is a browser policy supported by Google Chrome and Microsoft Edge that prevents users from loading listed URL patterns. A companion policy, URLAllowlist, defines exceptions. In Edge the Group Policy setting is called Block access to a list of URLs, and both policies are limited to 1,000 entries.
3. How to block websites on work computers used by remote employees?
Only if the device keeps using your DNS resolver. Once a laptop leaves the office network, DNS filtering set on the office router stops applying. Remote teams need a cloud DNS client, a secure web gateway agent, browser policies or endpoint rules that travel with the device.
4. Which websites should a business block?
Block malware, phishing, newly registered domains, adult content, gambling and unapproved file-sharing or personal cloud storage. Treat social media, streaming and news differently by role, using nudges or allowances rather than hard blocks, because many roles have legitimate business reasons to use them.
5. Is it better to block websites or monitor them?
Use blocking for genuine security and data risks, and lighter monitoring or nudges for productivity categories. Hard blocks on everyday sites tend to push activity to phones and create exception requests, while a short reminder with an acknowledgment often changes behavior with less friction.
6. Do I need to tell employees that websites are blocked or monitored?
Telling employees is good practice everywhere, and logging browsing activity is electronic monitoring, which New York, Connecticut and Delaware require employers to disclose in advance. GDPR also requires transparency in the EU. State the rules in your acceptable use policy and confirm local requirements with counsel.
7. Can employees get around website blocks?
Some methods are easy to bypass. Users with admin rights can edit the hosts file, alternative DNS or a VPN can sidestep network filters, and unmanaged browsers ignore browser policies. Remove local admin rights, manage or block other browsers, and use controls that run on the device itself.
Block real risks, nudge everything else. E-Monitor lets you set allow and block rules by organization, team or role, show policy nudges with logged acknowledgment, and alert on blocked categories and unapproved cloud storage. 7-day free trial, no credit card. Sign up →
