The simplest way depends on what you're blocking from

Blocking a website means preventing your device or network from loading it. The method you use depends on whether you want to block it from one computer, all devices in your home, or just yourself when you're tempted to visit. Your browser, your operating system, and your router all have different blocking tools — and they work in different ways.

The fastest option for one device is a browser extension. The most thorough option for a whole household is your router's settings. The most reliable option for yourself is a combination: use your browser to block the site, and use your operating system to prevent yourself from undoing it.

Key Takeaways

  • Browser extensions like Freedom, Cold Turkey, or LeechBlock NG block websites on a single device and are the fastest way to start.
  • Your router's parental controls or DNS settings can block a site across all devices on your network at once, but require you to log into your router's admin panel.
  • Operating system-level blocks (Windows hosts file, Mac parental controls) prevent the site from loading even if you try to unblock it in your browser.
  • DNS filtering services like Cloudflare's 1.1.1.1 for Families or OpenDNS block sites by intercepting the address lookup before your device even tries to connect.
  • No method is unbreakable — a determined user can bypass any of these by switching browsers, using a VPN, or changing their DNS settings.

Blocking a website in your browser

The easiest starting point is a browser extension. If you use Chrome, Edge, or Firefox, you can install a free extension that blocks specific websites you choose. LeechBlock NG (available for Chrome and Firefox) lets you type in a list of sites to block and set times when the block is active. Freedom (Chrome, Firefox, Edge, Safari) blocks websites and apps across your device and syncs your blocklist if you use multiple devices. Cold Turkey (Windows and Mac) is more aggressive — once you set a block, you cannot undo it until the timer runs out, even if you restart your computer.

To install an extension, go to your browser's extension store (Chrome Web Store for Chrome, Add-ons for Firefox, Extensions for Edge). Search for the extension name, click Add or Install, and follow the prompts. Once installed, the extension usually appears as an icon in your toolbar. Click it to add websites to your blocklist and set when the block should be active.

Browser extensions work only in that browser on that device. If you use Chrome on your laptop but Safari on your phone, you need to set up the extension separately on each one. If someone else uses your device with a different browser, they can visit the blocked site. If you want to block a site across your whole home network, you need a different approach.

Blocking websites through your router

Your router is the device that connects all your home devices to the internet. If you block a site at the router level, no device on your network can reach it — not your laptop, not your phone, not your tablet. This is the most thorough way to block a site for a household.

To do this, you 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 manual or the sticker on the back). Log in with your router's username and password (often admin and admin, or printed on the router). Look for a section called Parental Controls, Access Control, or Firewall. The exact names and steps vary by router brand — TP-Link, Netgear, Linksys, and others all have different layouts.

In that section, you can usually enter a website address or domain name to block. Some routers let you block by keyword (anything with "social" in the name) or by category (gambling, adult content). Once you save the setting, any device trying to reach that site gets blocked. The person trying to visit sees an error message instead of the page.

Router blocking is harder to bypass than browser blocking because it happens before your device even tries to connect. However, someone on your network can still change the router settings if they know the password, or they can use a VPN to route their traffic around the block.

Blocking websites at the operating system level

Your operating system — Windows, Mac, or Linux — can block websites by preventing your device from translating a website address into the number it needs to connect. This is more permanent than a browser extension because you cannot just switch browsers to get around it.

On Windows, you edit the hosts file. Open Notepad as Administrator (right-click Notepad, select Run as Administrator). Go to File, Open, and navigate to C:\Windows\System32\drivers\etc. Select All Files from the dropdown menu, then open the file called hosts (no extension). At the bottom, add a new line: 127.0.0.1 facebook.com (replace facebook.com with the site you want to block). Save the file. Now your computer will not be able to reach that site in any browser.

On Mac, you can use parental controls. Go to System Settings, then Family. Set up a child account (or use your own account), then go to App Limits and Website Restrictions. You can block specific websites or entire categories. Mac also has a hosts file (located at /etc/hosts) that works the same way as Windows, but editing it requires Terminal and administrator access.

Operating system blocks are harder to undo by accident, but someone with administrator access to your computer can still remove them. If you want to prevent yourself from undoing a block, combine this with a browser extension that has a timer you cannot override.

Using DNS filtering to block websites

DNS is the system that translates website names (google.com) into the numbers your device actually uses to connect. If you change your DNS settings, you can use a filtering service that blocks certain sites before your device even tries to reach them.

Cloudflare's 1.1.1.1 for Families is a free DNS service that blocks malware and adult content by default. To use it, you change your device's DNS settings to 1.1.1.1 and 1.0.0.1 instead of your internet provider's default DNS. On Windows, go to Settings, Network, Change Adapter Options, right-click your connection, Properties, Internet Protocol Version 4, Properties, and enter the new DNS addresses. On Mac, go to System Settings, Network, Wi-Fi, Advanced, DNS, and add the addresses there.

You can also change DNS at the router level, which applies to all devices on your network. Log into your router (same process as parental controls above), find the DNS settings, and enter the new addresses. OpenDNS is another popular option that lets you block specific categories of sites and see reports of what was blocked.

DNS filtering is effective because it blocks the site before your browser even tries to load it. However, someone can bypass it by changing their DNS settings back, or by using a VPN that has its own DNS.

Combining methods for stronger blocking

No single method is unbreakable. A determined person can switch browsers, use a VPN, change DNS settings, or restart their computer in safe mode. If you want to block a site for yourself and make it genuinely difficult to undo, combine multiple methods.

For example: install a browser extension like Cold Turkey that locks you out for a set time, edit your hosts file so the site does not work in any browser, and set your router to block it as well. If you are trying to block a site for children or other household members, add parental controls at the operating system level and set a strong router password that only you know.

The strongest combination is a browser extension with a timer you cannot override, plus a hosts file block, plus router-level blocking. This makes it so difficult to bypass that most people will give up rather than try.

What happens when someone tries to visit a blocked site

When a site is blocked, the person trying to visit it sees different error messages depending on where the block happened. A browser extension usually shows a custom message saying the site is blocked. A router block shows a generic error like "This site cannot be reached" or a custom message from your router. A hosts file block shows "This site cannot be reached" in the browser. A DNS filter shows "This site cannot be reached" or a message from the DNS service.

None of these messages tells the person exactly how the block was set up, which is why combining methods is effective — they would have to remove the block in multiple places to get around it.

Frequently Asked Questions

Can I block a website on just my phone?

Yes. On iPhone, go to Settings, Screen Time, Content & Privacy Restrictions, Restricted Websites, and add the site. On Android, install a browser extension like LeechBlock NG in Chrome, or use your phone's built-in parental controls if you set them up. Phone blocking works the same way as computer blocking — it applies only to that device and that browser.

What if I block a site and then forget why I blocked it?

Most browser extensions keep a log of blocked sites and let you unblock them anytime. If you used a hosts file, you can edit it again to remove the line. If you used router blocking, log back into your router and delete the site from the blocklist. The only method that is truly permanent is Cold Turkey with a timer — and that timer eventually runs out.

Can someone bypass a block I set on my router?

Yes, if they know the router password or if they use a VPN. A VPN routes their traffic through a different server, so the router cannot see or block it. If you want to prevent VPN use, some routers have settings to block VPN traffic, but these are not foolproof. For children, combining router blocking with device-level parental controls makes bypassing much harder.

Does blocking a website slow down my internet?

No. Browser extensions and hosts file blocks have no effect on speed. Router blocking and DNS filtering might add a tiny fraction of a second to each page load, but you would not notice it. The blocking happens so fast that it does not create any slowdown.

If I block a site, can the website owner see that I blocked it?

No. The block happens on your device or network, not on the website's server. The website has no way to know you blocked it. Your internet provider might see that you tried to visit the site (if you did not use a VPN), but the website itself cannot tell.