The main ways to block URLs depend on what device you're using and who you want to block them from

You can block websites at three different levels: on a single browser, on a device's operating system, or across your entire home network. Browser-level blocking works fastest if you only need to stop yourself from visiting one site. Device-level blocking prevents access from any browser on that computer or phone. Network-level blocking stops anyone on your Wi-Fi from reaching certain sites, which is useful if you're managing access for children or employees.

The method you choose depends on whether you're blocking sites from yourself, from other people on your device, or from everyone on your network. Each approach uses different tools and takes a different amount of time to set up.

Key Takeaways

  • Browser extensions like Freedom, Cold Turkey, and LeechBlock let you block specific websites within Chrome, Firefox, or Safari without affecting other programs on your computer.
  • Operating system settings on Windows, macOS, iOS, and Android let you block sites at the device level, which prevents access through any browser or app.
  • Your router's parental controls or a DNS filtering service like Cloudflare's 1.1.1.1 for Families can block websites for everyone connected to your home network.
  • Blocking at the network level requires you to change settings in your router or your internet provider's modem, which takes longer to set up but affects all devices.

Blocking websites in your browser with extensions

Browser extensions are the fastest way to block a single website or a small list of sites. They work only in the browser where you install them, so if you use Chrome at work and Safari at home, you'll need to install the extension in both places to block the same site everywhere.

Freedom (freedom.to) blocks websites and apps across Windows, macOS, iOS, and Android. You set a blocklist, choose when the block starts, and Freedom prevents access even if you try to uninstall it during the blocked time. It costs about $7 per month or $40 per year. Cold Turkey (getcoldturkey.com) works on Windows and macOS and lets you block sites on a schedule or immediately. The free version blocks one site at a time; the paid version ($39 one-time) blocks unlimited sites and can lock you out of your entire computer during focus sessions. LeechBlock NG is free and works in Chrome and Firefox. You set which sites to block and during which hours, and it's simple enough for basic blocking but doesn't prevent you from disabling it if you're determined.

To install a browser extension, open your browser's extension store (Chrome Web Store, Firefox Add-ons, or Safari Extensions), search for the tool by name, and click Add or Install. The extension then appears as an icon in your toolbar. Click it to set your blocklist and any time-based rules.

Blocking websites at the operating system level

Operating system blocking prevents access to a website through any browser or app on that device. On Windows 10 and 11, you can edit your hosts file to block sites locally. Open Notepad as administrator, go to File > Open, and navigate to C:\Windows\System32\drivers\etc\hosts. Add a new line with "127.0.0.1 example.com" (replace example.com with the site you want to block), then save. This method blocks the site for all users on that computer, but it only works if you know the exact domain name.

On macOS, the process is similar. Open Terminal, type "sudo nano /etc/hosts", enter your password, and add the same "127.0.0.1 example.com" line. Press Control+X, then Y, then Enter to save. Like Windows, this blocks the site for all users on the Mac.

On iPhone and iPad, go to Settings > Screen Time > Content & Privacy Restrictions > Restricted Websites. Tap Add a Website Under "Always Allowed" or "Never Allowed" and type the domain. This blocks the site in Safari and most apps, though some apps may bypass this restriction. On Android, settings vary by manufacturer. Most phones have a similar option under Settings > Digital Wellbeing & Parental Controls > App Timers or Restricted Content, but the exact path depends on whether you have a Samsung, Google Pixel, or another brand.

Blocking websites across your home network

Network-level blocking stops anyone connected to your Wi-Fi from reaching certain sites. This requires access to your router's settings. Most routers have a web interface you reach by typing your router's IP address (usually 192.168.1.1 or 192.168.0.1) into a browser, then logging in with your router's admin username and password. Look for a section called Parental Controls, Content Filtering, or Access Control, then add the websites you want to block.

If your router doesn't have built-in blocking, you can change your network's DNS settings instead. Cloudflare's 1.1.1.1 for Families is a free DNS service that blocks adult content and malware across all devices on your network. To use it, log into your router and change the DNS servers from your internet provider's addresses to 1.1.1.1 and 1.0.0.1. This change takes effect immediately for all devices that connect to your Wi-Fi after you save it.

Network blocking takes longer to set up than browser or device blocking, but it's the only method that works if you're trying to prevent other people (like children or employees) from accessing certain sites. It also persists even if someone tries to use a different browser or device.

Using parental control apps for comprehensive blocking

Google Family Link (free on Android and Chromebooks) lets you block apps and websites on a child's device from your own phone. You set up a supervised account on the child's device, then use the Family Link app on your phone to manage restrictions. You can block specific apps, set screen time limits, and see which sites the child visits. Apple Screen Time (built into iOS, macOS, and iPadOS) works similarly — you set up a child account, then manage restrictions from your own Apple device. Both services require the child's device to be set up under a supervised account, which means you control the password.

These tools are stronger than simple URL blocking because they also limit app usage and screen time, and they send reports to your device. They work best when the child doesn't know the account password and can't change the restrictions without your approval.

Blocking websites on your work network

If you manage a workplace network, blocking happens through your network administrator tools or a dedicated content filtering service. Most businesses use Fortinet FortiGate, Cisco Umbrella, or Palo Alto Networks to block categories of sites (like social media, streaming, or gambling) across all employee devices. These services work at the network level and log which employees visit blocked sites, which is why they're common in corporate environments.

If you're an individual managing a small office network, you can use your router's built-in parental controls or switch to a business-grade router that includes content filtering. The setup is similar to home network blocking, but business tools usually let you create different rules for different users or departments.

What happens when you try to visit a blocked website

When a website is blocked, what you see depends on where the block happens. Browser extensions usually show a custom message saying the site is blocked and may offer a button to temporarily unblock it (if you set that option). Operating system blocks show an error message that looks like a connection failure. Network-level blocks typically show a blank page or a message from your router or DNS service saying the site is blocked.

If you block a site and later want to unblock it, the process reverses: remove the extension, edit the hosts file, change your device settings, or update your router's blocklist. Network blocks take a few minutes to clear because your device may have cached the old DNS result, so you may need to restart your browser or device to see the change.

Frequently Asked Questions

Can someone bypass a website block I set up?

It depends on the level. Browser extension blocks are easiest to bypass — someone can uninstall the extension or use a different browser. Device-level blocks are harder to bypass without the admin password. Network-level blocks are hardest because they affect all devices, though someone could use mobile data instead of Wi-Fi to bypass them.

Will blocking a website slow down my internet?

No. Browser extensions have almost no impact on speed. Device-level blocks don't affect speed at all. Network-level blocks using DNS filtering may actually improve speed slightly because your router doesn't have to process traffic to blocked sites, though the difference is usually not noticeable.

Can I block a website on just one user account on my computer?

Not easily with built-in tools. The hosts file method blocks for all users. Your best option is to use a browser extension on that user's browser, or set up a supervised child account with parental controls if your operating system supports it.

What's the difference between blocking a domain and blocking a subdomain?

A domain is the main site (example.com), and a subdomain is a section of it (mail.example.com or support.example.com). If you block example.com, all subdomains are blocked too. If you only want to block one subdomain, you need to add it separately in your blocklist.

Do I need to restart my device after blocking a website?

Browser extensions take effect immediately. Device-level blocks usually take effect immediately, though some changes require a restart. Network-level blocks may take a few minutes to apply to all devices because of DNS caching, so restarting your browser or device speeds up the process.