Block Websites

How to Block Websites Even while Using a VPN

If you must use a VPN or proxy, here are some website blocking techniques that will work while a VPN is active.

techlockdown logo
Tech Lockdown Team
|
Updated July 26, 2024

VPNs and Proxies create issues for any blocking setup. If you are focused on creating a blocking system that prevents bypass, you ultimately need to account for VPNs and Proxys. However, there are some legitimate reasons to use a VPN, which means that it can be helpful to know how to block websites while using a VPN.

Although we recommend blocking VPNs for those trying to create a blocking system to quit harmful online addictions, VPNs are commonly used for a few reasons that might be a hard requirement for some people:

  1. Connecting to work or school networks
  2. Bypassing location restrictions
Work and School VPNs are not private
Your internet activity is most likely monitored when connecting to work or school via VPN. Don't look at anything that you wouldn't look at in an office or classroom!

Blocking Websites while a VPN is active on Windows or Mac

Windows and Mac computers have several techniques for blocking content while a VPN or Proxy is in use.

  1. Hosts file
  2. Browser Extensions
  3. Screen Time (Mac)

You can use your computer's hosts file to block websites  and this usually works even while a VPN or proxy is active.

Blocking a website with your hosts file is pretty simple, you just add a line to the file like this:

0.0.0.0 websitetoblock.com

There are also plenty of curated host file lists that you can copy/paste into your hosts file to block categories like Adult content.

Furthermore, content blocking that occurs within your computer's web browser should work as well. Browser extensions usually block content by inspecting the URL of the page for certain keywords or comparing those URLs to a list you specify.

Some extensions will also check the title of the website you visit and determine if it should be allowed or blocked based on disallowed keywords you specify.

These extensions will typically work alongside a VPN, unless they are blocking content by pointing your browser's DNS to a DNS Filter. 

In addition to website blocking browser extensions, Mac computers have access to Screen Time , which blocks content similarly to a browser extension.

This works alongside a VPN, but browser compatibility is a bit spotty. 

Create a DNS Content Policy
Create a DNS Content Policy
Enforce content filtering rules on all your devices.

Blocking Websites while using a VPN on a Smartphone

There are a few methods for blocking websites and categories of content while a VPN is active on your smartphone.

The first method is using parental controls for the iPhone or apps that block websites on Android. 

Many blocking apps on Android simply point your device's DNS to a filter that handles blocking content. These types of apps won't work because the VPN will override DNS Filtering. Instead, look for blocking apps that request Screen Reader permissions . Android blocking apps can use this accessibility service to identify content on your screen and block based on information that it can gather from you using your device, not your DNS traffic.

Screen Time for iOS works in a similar way. You can specify website blocklists and a Limit Adult Content option with Screen Time.

However, Screen Time is relatively easy to bypass. Apple provides a Screen Time alternative , however, which allows you to block websites while a VPN is active using an enforceable Web Content Filter. You can enforce the Limit Adult Content mode and also add your own list of URLs to block.

Android also gets access to a similar capability through Device Management. Using a Mobile Device Manager, you can enable the Android Web Content Filter and block content while a VPN is active on your Android phone.

Managing and Supervising smartphones can be confusing, so we've made step-by-step instructions available to our Tech Lockdown members in the Guides section of your dashboard.

Manage Android and iOS Devices at Home
Manage Android and iOS Devices at Home
Go further with blocking content and preventing bypass on iPhone and Android smartphones.
Open chat