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.
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.
- Open Notepad as an administrator. Search for “Notepad” in the Start menu, right-click, and select Run as administrator.
- Open the hosts file. Navigate to: C:\Windows\System32\drivers\etc\hosts
- Add the websites you want to block. At the bottom of the file, type:
- 127.0.0.1 example.com
- 127.0.0.1 www.example.com
- 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.
- Go to Settings > Accounts > Family & other users.
- Create or sign into a child account.
- Go to family.microsoft.com and log in.
- Select the child’s profile > Content Restrictions.
- 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.
- Download and install our VPN for Windows.
- Go to the Settings menu and navigate to Advanced Protection.
- Enable Ad Blocker and Parental Controls—this blocks ads, trackers, and adult content across all sites and apps.
- 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.
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.
- Go to System Settings > Screen Time.
- Select Content & Privacy > Turn on Restrictions.
- Under Web Content, select “Limit Adult Websites” or “Allowed Websites Only.”
- 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.
- Open Terminal. (Finder > Applications > Utilities > Terminal)
- Type: sudo nano /etc/hosts
- Enter your admin password.
- Add the sites to block:
- 127.0.0.1 example.com
- 127.0.0.1 www.example.com
- Save the file (Ctrl + X, then Y).
- 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:
- Download Google Family Link (on both parent and child devices).
- Link the child’s Google account.
- Go to Content Restrictions > Google Chrome.
- 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.
- Go to Settings > Network & Internet > Advanced > Private DNS.
- Select Private DNS provider hostname.
- 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
- Go to Settings > Screen Time.
- Tap Content & Privacy Restrictions > App Store, Media, Web & Games.
- Select “Web Content.”
- Choose Limit Adult Websites (Apple will block explicit sites automatically).
- 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
- Go to Settings > Wi-Fi.
- Tap your network > Configure DNS.
- 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
- Install ExpressVPN on your device.
- Go to Settings > Advanced Protection.
- Turn on Ad Blocker and Parental Controls.
- 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
- Go to the Chrome Web Store and search for extensions like:
- BlockSite (personal site blocking)
- StayFocusd (for productivity)
- uBlock Origin (to block malicious sites)
- Click “Add to Chrome” and install the extension.
- 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.
- Create a supervised user under Chrome’s settings.
- Log in to families.google.com and manage Chrome restrictions.
- 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:
- Go to Chrome Settings > Extensions.
- Find your website blocker extension.
- 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.
- Go to System Settings > Screen Time.
- Select Content & Privacy Restrictions.
- 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
- 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)
- 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:
- Go to Firefox Settings > Network Settings.
- 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
- Go to the Edge Add-ons Store (edge://extensions).
- Search for and install a blocking extension (BlockSite, LeechBlock, etc.).
- Add the sites you want to restrict.
Using Windows parental controls (for family safety)
- Go to Settings > Accounts > Family & other users.
- Create a child account and log in.
- 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:
- Go to Opera’s Extension Store and search for a blocking add-on.
- 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)
- Open Terminal and type: sudo nano /etc/hosts
- Add sites to block: 127.0.0.1 example.com
- 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
- Go to Brave Settings > Shields.
- Enable “Block scripts” and “Aggressive Ad Blocking.”
- 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.
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
- 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
- Add websites to block at the bottom of the file:
- 127.0.0.1 example.com
- 127.0.0.1 www.example.com
- 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
- 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).
- 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.
- 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).
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.
- Log into your router or firewall admin panel.
- Go to the firewall settings and look for a custom rules or URL filtering section.
- Enter the domain names of websites you want to block.
- 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.
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
- Go to Chrome Settings > Extensions (chrome://extensions/).
- Find the blocking extension (e.g., BlockSite, StayFocusd).
- 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.
- Go to families.google.com and log in with the parent/admin account.
- Check the Content Restrictions for Chrome.
- 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:
- Go to Chrome Settings > Reset settings (chrome://settings/reset).
- Click “Restore settings to their original defaults.”
- 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:
- Open Notepad as Administrator.
- Navigate to: C:\Windows\System32\drivers\etc\hosts
- Find and delete any lines blocking the website: 127.0.0.1 example.com
- Save the file and restart your computer.
Mac:
- Open Terminal and type: sudo nano /etc/hosts
- Enter your password and edit the file.
- Delete any lines blocking the website.
- 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.
- Go to Network Settings > Change Adapter Options.
- Select your active connection and go to Properties.
- Find Internet Protocol Version 4 (TCP/IPv4).
- 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
- 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.
- Open your antivirus or security software (Norton, McAfee, Bitdefender, etc.).
- Check Web Filtering, Safe Browsing, or Parental Controls.
- 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.
FAQ: About blocking websites
How do I permanently block a website?
To permanently block a website, use a method that applies system-wide or at the network level. Editing the hosts file on Windows or Mac prevents access across all browsers. Alternatively, configuring website filtering on a Wi-Fi router ensures the block applies to every device on the network. For more flexibility, parental control software or firewall rules can enforce restrictions with added security settings.
Can I block websites without an extension?
Yes, you can block websites without using a browser extension by modifying system settings. On Windows and Mac, you can edit the hosts file to redirect unwanted websites. Parental controls on macOS, Windows, and Android allow you to restrict site access without third-party tools. At the network level, changing DNS settings or using router-based filtering can block sites across all devices.
Can I block websites on my child’s phone?
Yes, parental control tools let you block websites on iPhone, iPad, and Android devices. On iOS, use Screen Time’s web content restrictions to block adult sites or specific URLs. For Android, Google Family Link lets parents manage site access in Chrome. Third-party parental control apps like Qustodio or Net Nanny offer more detailed filtering and monitoring options.
How do I know if a website is blocked?
If a website isn’t loading, it could be blocked at various levels. Try these checks:
- Try another browser. If the site works in a different browser, it’s likely a browser-based block (extension, settings, or parental controls).
- Switch networks. If the site is accessible on mobile data but not Wi-Fi, it may be blocked at the router or ISP level.
- Use a different DNS. Changing to Google DNS (8.8.8.8) or Cloudflare (1.1.1.1) can reveal whether the block is DNS-based.
- Check the hosts file. If a specific website won’t load across all browsers on your computer, it may be blocked in your system’s hosts file.
Can you block a website on mobile?
Yes, you can block websites on mobile devices using built-in settings or network-level controls. iPhones and iPads allow website blocking via Screen Time, while Android devices can restrict access through Google Family Link. For broader protection, blocking websites through Wi-Fi router settings or using DNS filtering will apply the restriction to all mobile devices connected to the network.
Can you block a website on a smart TV?
Some smart TVs allow website blocking through built-in parental controls or by modifying the Wi-Fi router settings. If your TV has a web browser, you may need to block sites at the router level using parental controls or custom DNS settings. Alternatively, a network-wide filtering service like OpenDNS can help restrict access across all devices, including smart TVs.
Can you block a website on a gaming console (PS5, Xbox)?
Gaming consoles don’t have built-in website blocking features, but you can enforce restrictions through network-level settings:
- Use router-based controls. Many routers allow you to block specific websites across all connected devices, including PlayStation and Xbox consoles.
- Enable parental controls. Both PlayStation and Xbox have built-in parental controls that let you restrict web browsing and online communication.
- Set up DNS filtering. Using a filtering DNS service like OpenDNS Family Shield can block adult sites and other restricted content on all devices, including consoles.
How do you unblock a website using a VPN?
A VPN (Virtual Private Network) encrypts your internet connection and routes it through a remote server, bypassing network or ISP restrictions. To unblock a website using a VPN:
- Download and install ExpressVPN
- Connect to a VPN server in a region where the site isn’t restricted.
- Reload the blocked website—it should now be accessible.
VPNs are useful for accessing sites blocked by schools, workplaces, ISPs, or government censorship while maintaining online privacy.
How do you block social media sites like Facebook, Instagram, and TikTok?
Blocking social media sites can be done at the device, browser, or network level:
- Use browser extensions (BlockSite, StayFocusd) to block social media in Chrome or Firefox.
- Modify system settings by editing the hosts file to prevent access on Windows or Mac.
- Set up parental controls on iOS (Screen Time) or Android (Google Family Link) to restrict social media apps and websites.
- Apply network-level restrictions using your router’s access control settings or a DNS filtering service like OpenDNS.
For workplaces or shared environments, using a firewall or proxy filtering system can block social media on all connected devices.

30-day money-back guarantee
