The fastest way depends on what you're using

You can block a website on Windows, Mac, iPhone, Android, or through your router — each method stops the site from loading when you try to visit it. The easiest route is usually your browser's built-in tools, which work in minutes and don't require technical knowledge. If you want to block a site across your entire home network so no device can reach it, you'll use your router instead. For parental controls on a child's device, your phone's operating system has native options that don't need extra software.

The method you choose depends on whether you want to block the site on one device or all devices in your home, and whether you need the block to survive if someone restarts the browser or changes settings. Browser extensions are easiest to set up but easiest to disable. Router-level blocks are harder to bypass but require access to your router's admin panel.

Key Takeaways

  • Browser extensions like Freedom, Cold Turkey, or LeechBlock NG block websites instantly and work on Windows, Mac, and Linux without touching your router.
  • Your router's parental controls or access restrictions can block a site across every device on your home network, but you need your router's admin password.
  • Windows has a built-in hosts file you can edit to block sites without installing anything, though it requires opening the command prompt as administrator.
  • iPhone and Android both have screen time and app restriction settings that let you block websites through the operating system itself.
  • Blocking a site at the router level is the hardest to bypass, but blocking it in your browser is the fastest to set up.

Using a browser extension (Windows, Mac, or Linux)

Browser extensions are the simplest method for most people because they work immediately and don't require you to touch your router or system files. Freedom, Cold Turkey, and LeechBlock NG are the most common options. They all work the same way: you install the extension, add the website URL to a blocklist, and the extension stops the site from loading whenever you try to visit it.

To install an extension in Chrome or Edge, go to the Chrome Web Store or Microsoft Edge Add-ons store, search for the extension name, and click "Add to Chrome" or "Add to Edge". For Firefox, use the Firefox Add-ons page. Once installed, the extension usually appears as an icon in your toolbar. Click it, find the settings or blocklist option, and paste in the full website address — for example, reddit.com or youtube.com. Some extensions let you set a password so you can't unblock the site without entering it, which is useful if you're trying to enforce the block on yourself.

The main limitation is that extensions only work in that specific browser. If you use Chrome for work and Firefox for personal browsing, you'd need to install the extension in both. Also, if you uninstall the extension or disable it, the block disappears immediately. For a stronger block that survives browser changes, use the hosts file method or your router instead.

Editing the hosts file on Windows or Mac

The hosts file is a system file that tells your computer which IP address to use when you type in a website name. By editing it, you can redirect a website to a fake address so it never loads. This method works on Windows and Mac without installing anything, and the block survives browser restarts and updates.

On Windows: Press the Windows key and type "notepad". Right-click Notepad and select "Run as administrator". Go to File > Open and navigate to C:\Windows\System32\drivers\etc. Find the file named hosts (it has no file extension). Open it. At the bottom of the file, add a new line that reads 127.0.0.1 reddit.com (replace reddit.com with the site you want to block). Save the file. The block takes effect immediately. If you want to block multiple sites, add each one on its own line with the same format.

On Mac: Open Terminal (find it in Applications > Utilities). Type sudo nano /etc/hosts and press Enter. You'll be asked for your password — type it (you won't see the characters appear). At the bottom of the file, add the same line: 127.0.0.1 reddit.com. Press Control+X, then Y, then Enter to save. The block takes effect immediately.

The hosts file method is stronger than browser extensions because it works at the operating system level — no browser can bypass it. The downside is that it's harder to undo if you make a mistake. If you block a site and then want to unblock it, you have to go back into the hosts file and delete the line you added. Also, this method only works on the specific computer you edit — it doesn't block the site on other devices in your home.

Blocking through your router

Your router is the device that connects all your home devices to the internet. If you block a website at the router level, no device in your home can reach it — not your computer, phone, tablet, or smart TV. This is the strongest method because it's nearly impossible to bypass without changing your router settings.

To access your router, open a web browser and type 192.168.1.1 or 192.168.0.1 into the address bar. You'll be asked to log in. If you've never changed the password, check the sticker on the back of your router — it usually has the default username and password printed on it. Once you're logged in, look for a section called "Parental Controls", "Access Control", "Blocked Sites", or "Website Filtering". The exact name varies by router brand. Add the website URL to the blocklist. Save your changes. The block takes effect immediately on all devices.

If you can't find the settings or don't remember your router password, you can reset the router to factory defaults by holding the reset button for 10 seconds, but this will erase all your custom settings and you'll have to set up your Wi-Fi password again. If you're unsure about your router model, check the label on the back or log into your internet provider's account online — they can usually tell you which router you have and may have instructions specific to your model.

The main drawback of router blocking is that anyone with access to your router's admin panel can unblock the site. If you want to prevent that, set a strong password in your router's settings. Also, router blocking only affects devices connected to your home Wi-Fi — if someone uses mobile data (4G or 5G) on their phone, the block won't apply.

Blocking websites on iPhone or iPad

Apple's Screen Time feature lets you block websites directly on your device without installing anything. Open Settings, go to Screen Time, and tap "Content & Privacy Restrictions". Turn on "Content & Privacy Restrictions" if it's not already on. Tap "Content Restrictions", then "Web Content". Select "Limit Adult Websites" or "Allowed Websites Only". If you choose "Limit Adult Websites", you can add specific sites to a blocklist by tapping "Add Website" under the "Never Allow" section. Type in the website address and tap "Add".

If you want to make the block harder to remove, set a Screen Time passcode in the main Screen Time settings. This prevents someone from turning off Content & Privacy Restrictions without the code. The block applies to Safari and most other browsers on the device, though some third-party browsers may not respect it.

Blocking websites on Android

Android doesn't have a built-in website blocker in the operating system itself, but you can use Google Family Link if you're setting up parental controls for a child's device. Open Family Link, select the child's account, go to "Controls on Google Play", and you can restrict apps — though this blocks entire apps rather than specific websites.

For blocking specific websites on Android, your best option is a browser extension if you use Chrome, or a third-party app like AppBlock or Freedom. These apps work similarly to browser extensions on Windows or Mac: you add the site to a blocklist and the app prevents it from loading. Some Android phones also have a "Digital Wellbeing" feature in Settings that offers basic app and website restrictions, though the options vary by phone manufacturer.

What to do if you need to unblock a site temporarily

If you've blocked a site and later need to access it, the steps depend on which method you used. For a browser extension, click the extension icon in your toolbar and look for a "Pause" or "Disable" option, or temporarily unblock the specific site. For the hosts file, open it again in Notepad or Terminal and delete the line you added. For your router, log back in and remove the site from the blocklist. For Screen Time on iPhone, you'll need the passcode you set.

If you set a password on a browser extension to prevent yourself from disabling it, you'll need to remember that password to unblock the site. If you forgot it, you can uninstall and reinstall the extension, which will reset it — but this defeats the purpose if you're trying to enforce the block on yourself. For the hosts file, there's no password protection, so anyone with access to your computer can unblock it by editing the file again.

Frequently Asked Questions

Can someone bypass a block I set on my router?

Yes, if they know your router's admin password or if they use mobile data instead of Wi-Fi. To make it harder, change your router's default admin password to something strong that only you know. Mobile data bypasses router blocks entirely, so if you're trying to enforce a block on a child's phone, also set restrictions in the phone's operating system or use Family Link.

Will blocking a website in my hosts file affect other people on my home network?

No. The hosts file only affects the specific computer you edited it on. Other devices in your home can still visit the site. If you want to block a site for everyone on your network, use your router's parental controls instead.

What's the difference between blocking a website and blocking an app?

Blocking a website stops you from visiting it in a browser. Blocking an app prevents you from opening the app itself. Some apps have built-in browsers, so blocking the app might be more effective than blocking the website. On iPhone, Screen Time can do both. On Android, Family Link blocks apps but not websites.

If I block a site using a browser extension, will it block it on my phone too?

No. Browser extensions only work in the browser you installed them in, on the device you installed them on. If you use Chrome on both your computer and phone, you'd need to install the extension on both. For a block that works across all your devices, use your router instead.

Can I block a website without the person knowing?

Not reliably. If you block it at the router level, they'll notice when the site stops loading. If you block it in their device's settings, they can usually see the restriction in their settings menu. The most transparent approach is to tell them why the block is in place.