How to block a website on any device or browser

Tips & tricks 17 mins

The internet is a place where distractions, security threats, and privacy risks thrive. Whether you want to block intrusive websites, limit access on a shared device, or prevent tracking from ad networks, knowing how to control what loads on your screen is essential.

Fortunately, blocking websites isn’t complicated. Depending on your needs, you can use browser settings, third-party tools, or even network-level restrictions to keep unwanted content at bay. This guide walks you through how to block a website on any device or browser, covering built-in features, parental controls, and advanced cybersecurity techniques.

Jump to… 

Why would you need to block a website?
How to block a website on different devices
The easiest way to block websites on any device
How to block a website on different browsers
Advanced Methods for Blocking Websites
How to unblock a website (if necessary)

Why would you need to block a website?

The internet is designed to keep you engaged—sometimes at the cost of your productivity, privacy, or security. From social media feeds engineered for endless scrolling to websites loaded with trackers and malicious ads, not every corner of the web is worth visiting. Blocking specific sites can help you take back control, whether you’re minimizing distractions, protecting your kids online, or securing your personal data.

Productivity and focus

Some websites are built for work—others are built to derail it. Social media, news sites, and online shopping platforms can quickly eat into your time, making it harder to stay focused. Blocking distracting websites during work hours (or study sessions) can help you stay on task.

Workplace productivity tools often include website-blocking features to limit access to non-work-related sites. On a personal level, setting restrictions on social media or entertainment platforms can create a more disciplined digital environment, reducing impulse browsing and improving concentration.

Parental controls and child safety

The internet isn’t always kid-friendly. From inappropriate content to online predators, there are plenty of reasons to set boundaries for younger users. Blocking websites can help create a safer online space by preventing access to explicit material, limiting exposure to harmful communities, and reducing screen time.

Children today are more tech-savvy than ever, which means parental controls need to be adaptable. Whether it’s restricting access to certain sites, setting up browsing filters, or blocking apps entirely, website blocking is a key part of digital parenting.

Take control of your family’s online safety. ExpressVPN Aircove’s built-in parental controls automatically block adult sites across all devices, keeping harmful content out of reach. No complicated setup, no workarounds—just a safer internet experience for your home.

Get ExpressVPN

 

Security and privacy reasons

Not every website is safe to visit. Some are loaded with malware, phishing scams, or invasive trackers that collect personal data. Even seemingly harmless sites can be riddled with ads that lead to dangerous redirects, fake downloads, and privacy risks.

Blocking websites at the browser or network level can help prevent accidental clicks on malicious links, limit online tracking, and reduce exposure to scam sites. Whether you’re securing your own data or protecting a shared device, controlling access to risky websites is a simple but effective cybersecurity measure.

How to block a website on different devices

The way you block a website depends on the device you’re using and how much control you need. If you’re just trying to stop yourself from checking Facebook every five minutes, a simple browser extension might do the trick. But if you’re setting up restrictions for a shared device or blocking shady websites at the network level, you’ll need something more robust.

Here’s how to block websites on Windows, Mac, Android, and iOS, using built-in tools, third-party apps, and ExpressVPN’s advanced protection features.

How to block a website on Windows (step-by-step guide)

Windows gives you multiple ways to restrict website access, from editing system files to using parental controls and third-party apps. Here’s how to do it:

Method 1: Edit the Windows hosts file (permanent block)

The hosts file lets you manually block websites at the system level—preventing all browsers from accessing them.

  1. Open Notepad as an administrator. Search for “Notepad” in the Start menu, right-click, and select Run as administrator.
  2. Open the hosts file. Navigate to: C:\Windows\System32\drivers\etc\hosts 
  3. Add the websites you want to block. At the bottom of the file, type:
  4. Save the file and restart your computer.

Note: This method is manual and can be undone if someone knows where to look.

 

Method 2: Use Windows parental controls

If you’re blocking sites for child safety, Microsoft Family Safety offers built-in controls.

  1. Go to Settings > Accounts > Family & other users.
  2. Create or sign into a child account.
  3. Go to family.microsoft.com and log in.
  4. Select the child’s profile > Content Restrictions.
  5. Enable “Block inappropriate websites” and manually add sites to the block list.

Best for: Parents controlling access on family devices.

 

Method 3: Use ExpressVPN’s ad blocker and parental controls

If you’re looking to block intrusive ads, trackers, or adult content across all browsers and apps, ExpressVPN’s built-in protection features can handle it.

  1. Download and install our VPN for Windows.
  2. Go to the Settings menu and navigate to Advanced Protection.
  3. Enable Ad Blocker and Parental Controls—this blocks ads, trackers, and adult content across all sites and apps.
  4. Connect to ExpressVPN to activate these settings.

Why this works: Unlike browser-based blocking, this applies system-wide—no workarounds, no sneaky incognito mode bypasses.

 

Get ExpressVPN

How to block a website on Mac (built-in & third-party solutions)

Mac users can block websites using Screen Time, modifying system files, or third-party tools that block websites. 

Method 1: Block websites using Screen Time

Screen Time is Apple’s built-in tool for managing app and web access.

  1. Go to System Settings > Screen Time.

  1. Select Content & Privacy > Turn on Restrictions.

  1. Under Web Content, select “Limit Adult Websites” or “Allowed Websites Only.”

  1. Manually add sites to block.

Best for: Quick, user-friendly control over website access.

 

Method 2: Edit the hosts file (advanced users)

Like Windows, macOS allows manual website blocking via the hosts file.

  1. Open Terminal. (Finder > Applications > Utilities > Terminal)
  2. Type: sudo nano /etc/hosts
  3. Enter your admin password.
  4. Add the sites to block:
  5. Save the file (Ctrl + X, then Y).
  6. Flush the DNS cache: sudo dscacheutil -flushcache

Best for: Users who need system-wide website blocking without installing additional software.

 

How to block a website on Android

Android users can block websites through DNS filtering, parental controls, or third-party apps.

Method 1: Block websites with Google Family Link

For parental control on a child’s Android device:

    1. Download Google Family Link (on both parent and child devices).
    2. Link the child’s Google account.
    3. Go to Content Restrictions > Google Chrome.
    4. Select “Try to block mature sites” or manually add sites to block.

Best for: Parents managing internet access for children.

 

Method 2: Use Private DNS (Cloudflare or OpenDNS)

Some DNS services allow website filtering at the network level.

  1. Go to Settings > Network & Internet > Advanced > Private DNS.
  2. Select Private DNS provider hostname.
  3. Enter a filtering DNS, like:
    • OpenDNS (blocks adult content): family-filter.opendns.com
    • Cloudflare’s Family Filter: family.cloudflare-dns.com

Best for: Blocking websites across all browsers without installing apps.

 

How to block a website on iPhone and iPad

Apple devices come with built-in tools for blocking websites, making it easy to limit access on Safari and other apps.

Method 1: Use Screen Time to restrict websites

  1. Go to Settings > Screen Time.

  1. Tap Content & Privacy Restrictions > App Store, Media, Web & Games.

  1. Select “Web Content.”

  1. Choose Limit Adult Websites (Apple will block explicit sites automatically).

  1. To manually block sites, tap “Add Website” under “Never Allow.”

Best for: Blocking sites without installing third-party apps.

 

Method 2: Use Private DNS for network-level blocking

  1. Go to Settings > Wi-Fi.
  2. Tap your network > Configure DNS.
  3. Select Manual and enter DNS addresses (like OpenDNS for content filtering).

Best for: Blocking websites without affecting app usage

The easiest way to block websites on any device

While manual methods work, they only apply to specific browsers or require constant updates. The easiest way to block websites across all devices and apps is by using ExpressVPN’s advanced protection features.

Why ExpressVPN?

  • Blocks intrusive ads, trackers, and malicious sites automatically
  • Applies across all apps and browsers, not just one
  • Works on Windows, Mac, Android, iPhone, and even routers
  • No manual configuration needed: just turn it on and browse safely

How to Block Websites with ExpressVPN

  1. Install ExpressVPN on your device.
  2. Go to Settings > Advanced Protection.
  3. Turn on Ad Blocker and Parental Controls.
  4. Connect to ExpressVPN to activate blocking.

For whole-home protection, ExpressVPN Aircove blocks harmful content at the router level—no extra setup needed.

How to block a website on different browsers

Blocking websites at the device level works, but if you primarily browse in Chrome, Safari, Firefox, or Edge, you might prefer a browser-based solution. Most browsers don’t offer native site-blocking features, but extensions, parental controls, and DNS settings can help.

Here’s how to block websites on Chrome, Safari, Firefox, Edge, Opera, Linux, and Brave—including how to enforce restrictions in Incognito mode.

How to block a website on Chrome

Unlike some browsers, Chrome doesn’t have a built-in way to block websites. Instead, you’ll need to use a browser extension or Chrome’s supervised user settings for parental controls.

Using a browser extension

  1. Go to the Chrome Web Store and search for extensions like:
    • BlockSite (personal site blocking)
    • StayFocusd (for productivity)
    • uBlock Origin (to block malicious sites)
  2. Click “Add to Chrome” and install the extension.
  3. Set up your blocklist—add the websites you want to block.

Using Chrome’s built-in features

If you need parental controls for Chrome, you can set up a supervised Google account and restrict access through Google Family Link. 

  1. Create a supervised user under Chrome’s settings.

  1. Log in to families.google.com and manage Chrome restrictions.
  2. Under Content Restrictions > Chrome, block specific websites.

Blocking websites in Incognito mode

By default, Chrome extensions don’t work in Incognito mode—so users can bypass restrictions by switching to private browsing. To fix this:

  1. Go to Chrome Settings > Extensions.
  2. Find your website blocker extension.
  3. Click “Details” and enable “Allow in Incognito.”

How to block a website on Safari

Apple’s Safari browser comes with built-in website blocking tools, making it one of the easiest browsers to restrict access on—especially for Mac and iPhone users.

  1. Go to System Settings > Screen Time.
  2. Select Content & Privacy Restrictions.
  3. Under Web Content, choose “Limit Adult Websites” or manually add sites.

For more advanced blocking, you can also use DNS filtering (like Cloudflare or OpenDNS) to restrict websites at the network level.

How to block a website on Mozilla Firefox

Firefox is one of the most privacy-focused browsers, but it doesn’t have native website blocking. Instead, you’ll need extensions or DNS filtering.

Using a Firefox Add-on

  1. Go to Firefox Add-ons (about:addons) and search for:
    • LeechBlock NG (blocks sites permanently or on a schedule)
    • uBlock Origin (blocks ad-heavy or malicious sites)
  2. Install and configure the extension with your blocked sites.

Blocking websites via DNS filtering (for network-wide control)

For more permanent website blocking, you can change DNS settings at the router or device level:

  1. Go to Firefox Settings > Network Settings.
  2. Enable “Use custom DNS” and enter a DNS provider with filtering (like OpenDNS).

How to block a website on Microsoft Edge

Microsoft Edge is based on Chromium (like Chrome), so the methods are similar:

Using an Extension

  1. Go to the Edge Add-ons Store (edge://extensions).
  2. Search for and install a blocking extension (BlockSite, LeechBlock, etc.).
  3. Add the sites you want to restrict.

Using Windows parental controls (for family safety)

  1. Go to Settings > Accounts > Family & other users.
  2. Create a child account and log in.
  3. Go to family.microsoft.com and block sites under Content Restrictions.

How to block a website on Opera

Opera has a built-in ad blocker, but for full site blocking, you’ll need an extension:

  1. Go to Opera’s Extension Store and search for a blocking add-on.
  2. Install and configure the add-on with your blocklist.

For network-wide blocking, change your DNS settings under Settings > Privacy & Security.

How to block a website on Linux

If you’re using Linux, you have system-level control over website blocking.

Editing the hosts file (permanent block)

  1. Open Terminal and type: sudo nano /etc/hosts
  2. Add sites to block: 127.0.0.1 example.com
  3. Save the file and restart your system.

How to block a website on Brave Browser

Brave is built for privacy-first browsing, and it already blocks trackers and ads. But for full site blocking:

Using Brave’s built-in shields

  1. Go to Brave Settings > Shields.
  2. Enable “Block scripts” and “Aggressive Ad Blocking.”
  3. Manually add blocked sites in Brave’s filter settings.

Block unwanted websites the easy way. Instead of manually tweaking browser settings or installing multiple extensions, ExpressVPN’s advanced protection featuress let you block trackers, ads, and harmful sites across all browsers and apps—without extra setup.

Get ExpressVPN

Advanced Methods for Blocking Websites

If you need stronger, system-wide website blocking that works outside your browser, these methods offer a more permanent solution. Whether you’re blocking distractions on all devices, enforcing parental controls, or tightening security at the network level, here’s how to restrict access with advanced tools.

How to block a website using a hosts file

A hosts file lets you block websites at the system level, meaning the restriction applies across all browsers without needing an extension. This method is free, works offline, and doesn’t rely on third-party tools—but it’s also manual and requires admin access.

Windows & Mac: Editing the hosts file

  1. Open the hosts file (admin access required):
    • Windows: Open Notepad as an administrator and navigate to: C:\Windows\System32\drivers\etc\hosts
    • Mac: Open Terminal and type: sudo nano /etc/hosts
  2. Add websites to block at the bottom of the file:
    • 127.0.0.1 example.com 
    • 127.0.0.1 www.example.com
  3. Save the file and restart your computer.

Best for: Users who want system-wide blocking without extra software.
Downside: Requires manual updates and can be bypassed by modifying the file.

 

How to block websites using a Wi-Fi router

If you want to block sites for all devices on your home network, router-level filtering is the best option. This method is harder to bypass since it applies before websites even load—but not all routers support it.

Method 1: Block websites using your router’s built-in controls

  1. Log into your router’s admin panel:
    • Open a browser and enter 192.168.1.1 or 192.168.0.1.
    • Log in using your router’s admin username and password (often found on the router label).
  2. Find the website filtering or access control settings:
    • Some routers have a “Blocked Sites” section under Security or Access Control.
    • If available, enter the domains you want to block.
  3. Save changes and restart your router.

Method 2: Upgrade to a router with more advanced blocking

Most ISP-provided routers have limited filtering options. If you want stronger control, consider upgrading to a router with more advanced site-blocking features, such as:

  • ExpressVPN Aircove (for automatic blocking of ads and adult sites).
  • DD-WRT or OpenWRT routers (supports custom firewall rules).
  • pfSense routers (enterprise-grade blocking and security filtering).

Get ExpressVPN

How to block websites at the network level (without DNS filtering)

Since we already covered DNS filtering earlier, let’s focus on alternative methods for blocking websites at the network level, like firewall rules and proxy filtering.

Method 1: Using firewall rules for site blocking

Some routers and enterprise-level systems let you create firewall rules to block websites before they even load.

  1. Log into your router or firewall admin panel.
  2. Go to the firewall settings and look for a custom rules or URL filtering section.
  3. Enter the domain names of websites you want to block.
  4. Apply changes and restart the router.

Note: Requires a router with firewall customization options (not available on basic models).

Method 2: Using a proxy filter for content blocking

Some workplaces and schools use proxy filtering to block websites. This method requires routing all internet traffic through a filtering proxy, which scans and blocks requests in real time.

Popular proxy-based filtering tools include:

  • Squid Proxy (for Linux servers).
  • Pi-hole (for blocking ads and sites on a local network).

For the easiest way to block ads, trackers, and harmful sites without constant manual updates, ExpressVPN’s Advanced Protection is the most effective solution.

Get ExpressVPN

How to unblock a website (if necessary)

Blocking websites can be useful—but what if you need access again? Whether a site was blocked by accident, by an admin, or through network restrictions, there are ways to regain access. Some methods work instantly, while others require more technical changes depending on how the block was enforced.

Here’s how to temporarily or permanently unblock a website on Chrome, Windows, and Mac.

Temporary vs. permanent unblocking

Before unblocking a website, consider whether the block is temporary or permanent—and whether it was intentionally set or applied by an external source.

  • Temporary blocks often come from browser extensions, parental controls, or local network restrictions. These can usually be bypassed quickly.
  • Permanent blocks occur at the system or network level, requiring admin access or a manual override. Some restrictions—like government censorship—are enforced externally, meaning you’ll need a workaround to regain access.

Quick fixes for temporary unblocking

If a website isn’t loading, try these fast solutions:

  • Switch browsers. If the block is browser-specific, opening the site in Firefox or Edge may work.
  • Use a VPN. If the restriction is network-wide (e.g., ISP, workplace, or regional censorship), a VPN can encrypt your traffic and restore access.
  • Try mobile data. If a site is blocked on Wi-Fi, switching to cellular data can sometimes bypass the restriction.
  • Use a web proxy. Online proxies like hide.me or KProxy let you access blocked sites without modifying system settings.

Methods for Permanent Unblocking

For restrictions that require manual intervention, you’ll need to reverse the original blocking method:

  • Browser-based blocks: Disable extensions or parental controls in Chrome, Firefox, or Edge settings.
  • System-wide blocks: If a site was added to the hosts file, it needs to be removed manually.
  • Network-level blocks: Changing DNS settings can bypass ISP or administrator-imposed restrictions.
  • Parental controls: If a site is blocked via Windows Family Safety, Mac Screen Time, or security software, it must be removed from the restriction list.

How to unblock a website on Chrome

If a site is blocked only in Chrome, the restriction is likely caused by an extension, browser settings, or supervised user controls.

Method 1: Disable the blocking extension

  1. Go to Chrome Settings > Extensions (chrome://extensions/).
  2. Find the blocking extension (e.g., BlockSite, StayFocusd).
  3. Toggle it off or click Remove to disable blocking completely.

Best for: Unblocking sites that were manually restricted via an extension.

 

Method 2: Check supervised user or family link settings

If Chrome is managed by a Google Family Link account or workplace admin, site restrictions may be enforced remotely.

  1. Go to families.google.com and log in with the parent/admin account.
  2. Check the Content Restrictions for Chrome.
  3. Remove the site from the blocked list (if you have permission).

Best for: Reversing parental controls on Chrome.

 

Method 3: Reset Chrome’s Settings

If the restriction persists and you’re unsure what’s causing it:

  1. Go to Chrome Settings > Reset settings (chrome://settings/reset).
  2. Click “Restore settings to their original defaults.”
  3. Confirm the reset (this removes extensions and custom settings).

Best for: Removing unknown blocks from extensions, settings, or malware.

 

How to unblock a website on Windows or Mac

If a site is blocked system-wide, it’s likely due to hosts file modifications, firewall rules, or DNS restrictions.

Method 1: Remove the website from the hosts file

If a site was manually blocked using the hosts file, you’ll need to edit it to remove restrictions.

Windows:

  1. Open Notepad as Administrator.
  2. Navigate to: C:\Windows\System32\drivers\etc\hosts
  3. Find and delete any lines blocking the website: 127.0.0.1 example.com
  4. Save the file and restart your computer.

Mac:

  1. Open Terminal and type: sudo nano /etc/hosts
  2. Enter your password and edit the file.
  3. Delete any lines blocking the website.
  4. Save changes (Ctrl + X, then Y) and flush DNS: sudo dscacheutil -flushcache

Best for: Sites blocked via manual hosts file edits.

 

Method 2: Change DNS settings (bypass network-level blocks)

If your network administrator or ISP is blocking a site, changing your DNS settings to a third-party provider like Cloudflare (1.1.1.1) or Google DNS (8.8.8.8) can help.

  1. Go to Network Settings > Change Adapter Options.
  2. Select your active connection and go to Properties.
  3. Find Internet Protocol Version 4 (TCP/IPv4).
  4. Click “Use the following DNS servers” and enter:
    • Google DNS: 8.8.8.8 and 8.8.4.4
    • Cloudflare DNS: 1.1.1.1 and 1.0.0.1
  5. Save and restart your connection.

Best for: Unblocking sites restricted at the network level.

 

Method 3: Disable website blocking in security software

Some antivirus or parental control software automatically blocks sites based on security settings.

  1. Open your antivirus or security software (Norton, McAfee, Bitdefender, etc.).
  2. Check Web Filtering, Safe Browsing, or Parental Controls.
  3. Remove the blocked website from the restricted list.

Best for: Unblocking sites blocked by security software or parental controls.

 

Want the easiest way to unblock sites securely? A VPN like Express VPN encrypts your connection and helps you access restricted content without modifying system settings.

Get ExpressVPN

FAQ: About blocking websites

How do I permanently block a website?

Can I block websites without an extension?

Can I block websites on my child’s phone?

How do I know if a website is blocked?

Can you block a website on mobile?

Can you block a website on a smart TV?

Can you block a website on a gaming console (PS5, Xbox)?

How do you unblock a website using a VPN?

How do you block social media sites like Facebook, Instagram, and TikTok?

Phone protected by ExpressVPN.
Privacy should be a choice. Choose ExpressVPN.

30-day money-back guarantee

A phone with a padlock.
We take your privacy seriously. Try ExpressVPN risk-free.What is a VPN?
I like hashtags because they look like waffles, my puns intended, and watching videos of unusual animal friendships. Not necessarily in that order.