What blocking a website actually does

Blocking a website means setting up a barrier between your device and that web address so the site won't load when you type it in or click a link to it. The block happens on your device or network, not on the internet itself — the website keeps running normally for everyone else. You're just preventing yourself from reaching it.

People block websites for different reasons: to avoid distraction while working, to keep children from reaching certain content, to stop yourself from visiting a site you're trying to quit, or to prevent malware from loading. The method you choose depends on what device you're using, who else uses it, and how permanent you want the block to be.

A blocked website typically shows an error message or a custom page you've set up instead of the site's real content. You won't see ads, you won't load any of its pages, and links to it won't work — but you can usually unblock it later if you change your mind.

Key Takeaways

  • Browser extensions like Freedom, Cold Turkey, or LeechBlock are the fastest way to block one or two sites on a single computer.
  • Your router settings let you block a site across every device on your home network at once, which is useful if you're managing access for others.
  • Operating system settings (Windows hosts file, Mac parental controls, or Android app restrictions) block sites at a deeper level and are harder to bypass.
  • The strength of your block depends on your goal: a browser extension is straightforward to turn off, while a router block requires network access to remove.

Blocking a website in your browser

The simplest method is a browser extension designed to block sites. These work on Windows, Mac, and Linux, and they're free. Popular options include Freedom, Cold Turkey Blocker, LeechBlock NG, and StayFocusd (for Chrome). You install the extension, add the website address to a blocklist, and the extension stops the page from loading.

To install an extension: open your browser's extension store (Chrome Web Store, Firefox Add-ons, or Edge Add-ons), search for the blocker you want, click "Add to [Browser]", and confirm. Then open the extension's settings, find the blocklist or blocked sites section, and type in the web address you want to block — usually just the domain name like "facebook.com" or "reddit.com".

Browser blocks are straightforward to turn off: you can usually disable the extension in seconds if you really want to. They also only work in that one browser on that one device. If you use Chrome at work and Safari at home, you'd need to set up the block in both places separately. But for personal use on a single computer, they're the fastest option.

Blocking a website through your router

Your router is the device that connects your home to the internet. If you block a site there, it blocks for every device on your network — your phone, laptop, tablet, and anyone else's devices too. This is useful if you're managing internet access for a household or want to prevent a site from loading no matter which device you use.

To block at the router level, 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 — check your router's label or manual if those don't work). Log in with your router's username and password (also on the label, or "admin" and "admin" if you've never changed it). Look for a section called "Parental Controls", "Access Control", "Blocked Sites", or "Content Filtering" — the exact name varies by router brand.

Add the website address to the blocklist. Some routers let you block by domain name (facebook.com), while others require you to block by IP address — if yours asks for an IP, you can find it by opening a command prompt and typing "ping facebook.com" (on Windows) or "nslookup facebook.com" (on Mac). Save the settings and the block takes effect when ready across your network.

Router blocks are stronger than browser blocks because they work before the request even reaches your device. But they affect everyone on the network, and you need the router's admin password to remove the block.

Blocking a website on Windows

Windows lets you block a site by editing the hosts file, a text file that tells your computer which IP address to use for a domain name. When you block a site this way, your computer gets a fake IP address and the site won't load in any browser.

Open Notepad as an administrator: press the Windows key, type "Notepad", right-click it, and select "Run as administrator". Then go to File > Open and navigate to C:\Windows\System32\drivers\etc\. Change the file type dropdown from "Text Documents" to "All Files" so you can see the "hosts" file. Open it.

At the bottom of the file, add two lines for each site you want to block. Type "127.0.0.1 facebook.com" and on the next line "127.0.0.1 www.facebook.com". The 127.0.0.1 address is your computer's local address — it sends the request nowhere. Save the file. The block takes effect when ready and works in all browsers.

To remove the block later, open the hosts file again and delete those two lines. This method is stronger than a browser extension because it works at the operating system level, but it requires administrator access to edit.

Blocking a website on Mac

Mac users can edit the hosts file the same way Windows users do, but the path is different. Open Terminal (search for it in Spotlight), then type "sudo nano /etc/hosts" and press Enter. You'll be asked for your password. Add the same two lines as Windows: "127.0.0.1 facebook.com" and "127.0.0.1 www.facebook.com". Press Control+X, then Y, then Enter to save.

Alternatively, use Mac's built-in parental controls if you're blocking sites for someone else on a shared computer. Go to System Preferences > Parental Controls, select the user account, click the "Content" tab, and choose "Restrict websites". You can allow only certain sites or block specific ones. This method requires the admin password to change, making it harder to bypass.

Blocking a website on your phone

On iPhone, go to Settings > Screen Time > Content & Privacy Restrictions > Restricted Websites. Add the site you want to block. This requires a Screen Time passcode, so someone can't remove the block without knowing it. The block works across all browsers on the phone.

On Android, the process depends on your phone's manufacturer. Most Android phones don't have a built-in website blocker, so you'll need to install an app from the Google Play Store — search for "website blocker" and choose one with good reviews. Popular options include Freedom, Cold Turkey, and AppBlock. Install it, add the site to the blocklist, and set a PIN so the block can't be removed without the code.

Phone blocks are useful because you carry your phone everywhere, but they're also the easiest to bypass if you know the PIN or passcode. For stronger control, combine a phone block with a router block so the site is blocked across your entire network.

Choosing the right blocking method for your situation

If you're blocking a site for yourself on one computer, a browser extension is the fastest choice — install it in two minutes and you're done. If you want to block across all your devices, use your router instead. If you're managing access for someone else in your household, combine a router block with device-level blocks (parental controls on their phone or computer) so they can't bypass it by switching devices.

For the strongest block, use multiple methods at once. Block at the router level so it affects all devices, then also block in the browser or operating system on the specific device. This way, even if someone figures out how to disable one block, the others still work.

Keep in mind that determined users can usually find a way around any block — they can use a different network, a VPN, or a different device. Blocks work best as a tool to reduce temptation or distraction, not as an absolute barrier. If you're trying to prevent a child from accessing harmful content, combine technical blocks with open conversation about why the block exists.

Frequently Asked Questions

Can I block a website on just one app instead of the whole browser?

Not directly — blocks work at the browser level or device level, not per app. But if you want to prevent yourself from using a specific app (like Instagram or TikTok), you can use app blockers like Freedom or AppBlock, which pause the app during certain hours or until you complete a task. These are different from website blockers but solve the same distraction problem.

What happens if I block a website and then forget I blocked it?

You'll see an error message when you try to visit it — usually something like "This site can't be reached" or a custom message from your blocker. The error message usually tells you which tool is blocking it. If you set up the block months ago and forgot, check your browser extensions first, then your router settings, then your hosts file.

Can I block a website temporarily, like just during work hours?

Yes — most browser extensions and app blockers let you set schedules. Open the blocker's settings, find the schedule or timer option, and set it to block only between certain hours. When the time window closes, the block automatically lifts. This is useful if you want to prevent distraction during work but allow yourself access in the evening.

Will blocking a website slow down my internet?

No. A block just prevents a connection from being made — it doesn't use bandwidth or processing power. Your internet speed stays the same whether you have one site blocked or a hundred.

What if the website uses a different domain name, like facebook.com and m.facebook.com?

You need to block both separately. Most blockers let you add multiple addresses to the same blocklist. For the mobile version, add "m.facebook.com" as a second entry. Some blockers have a wildcard option that blocks all subdomains at once — check your blocker's settings to see if it supports that.