Ultimate guide to blocking porn on computers in 2023

Blocking guide for Windows and Mac desktop or laptop computers.

by Tech Lockdown Team
|
Updated September 1, 2023

As a work-from-home software developer, I've spent a considerable amount of time crafting my own setup for blocking porn and distracting content on my computers.

Blocking content on your computer adds significant friction between you opening a private browser window and distracting yourself. In fact, you can make it so difficult to access adult content that you stop thinking about your computer as something that you can even view porn on.

My approach to blocking focuses on two areas:

  1. Set up multiple layers of effective blocking
  2. Prevent easy bypassing of blocking and filtering

Blocking Techniques

There are a few approaches to setting up effective blocking. The approach you use will depend on the level of strictness you require.

Hosts file

Every computer can block websites for free using a hosts file, which enables you to block or redirect any website. The hosts file is a critical level of protection when blocking porn .

I'll just provide a general overview of what you can do with the hosts file. You can reference my free  hosts file guide for configuring the hosts file on Windows or Mac.

You can completely block thousands of websites using curated lists of social media and adult content websites that you can copy/paste into your hosts file.

In addition to blocking websites , you can also force strict SafeSearch mode on the most common search engines. 

Ban Porn from your Life

Get access to blocking techniques that actually work

DNS Filtering

DNS Filtering is the cornerstone of any effective blocking setup.

For example, with the  filter provided by Tech Lockdown , you can customize your blocked categories and maintain your own allow/block lists:

In addition to blocking categories of websites, you can enforce SafeSearch on supported search engines and block search engines without a SafeSearch mode.

It's important that you are able to block Proxy & Filter Avoidance websites to make filtering harder to bypass.

If you are self-managing your blocking system, you might prefer to lock your filter settings to prevent easily unblocking content that should be blocked by the filter:

Once you choose a filter, you can follow my network filtering setup guide to set up filtering on your home internet connection.

Get Powerful DNS Filtering

Set up filtering on all your devices and prevent common bypass techniques.

Home Network

Start by configuring a DNS Filtering service on your home network via your modem/router. Any device that uses your home internet connection will benefit from content filtering.

You can connect your home network to a filter by first linking your home network address.

Then, you simply need to point your router's DNS to the filter's IP addresses:

Roaming Networks

You can configure your computer to point to a DNS Filter even when you switch internet connections. This is useful if you travel a lot or want to prevent yourself from bypassing filtering by switching to your phone's hotspot connection when at home.

Some DNS Filter services, like Tech Lockdown , provide an application that keeps your computer connected to a DNS Filter service even when you're not on your home network.

Blocker Applications

Blocking software isn't a primary way to block porn , but blocking applications provide unique capabilities that you will not get from the hosts file or from DNS Filtering services.

Similar to the hosts file, this blocking method will also work even while using a VPN or Proxy.

You can typically use a blocking application to block specific pages in a website instead of just the entire website domain.


Become a Tech Lockdown member to get access to step-by-step premium blocking guides and expert support.


Block Pages within a Website

Blocker applications can block pages with a website, not just the entire domain.

You can block access to all of reddit.com while allowing access to a specific section, like reddit.com/r/nofap.

Blocking Searches

You can block searches containing specific keywords on Google, Youtube, or most other search portal websites.

For example, when you search for"fruit" on most websites, the URL will usually have a part like this:

?query=fruit

?q=fruit

To block searches on Google and Youtube containing the word "fruit," you can use a blocking application to block that with a blocking expression like this:

Block Google Images

If you want to block Google images, you'll likely need to use a blocking application. You can force safesearch using a DNS Filter, which filters Google images, but you can't block image search entirely. This is where a blocking application can provide some benefit to you if you don't want the option to search images at all.

When you search on Google images, the URL changes to something like this: https://www.google.com/search?q=apples....&tbm=isch

If you want to block Google image search entirely, you can use a blocking application to create a block like this to target image search specifically:

*google.com/search*tbm=isch*
Block Based on Window Titles

When you visit a page in your browser, you'll see the title in the tab.

You can configure blocking applications on platforms like Windows to block any website that uses a specific title or contains specific words. 

Go Beyond Beyond Basic Blocking

Elevate your content blocking and bypass prevention.

Built-in Content Filtering

If you have set up a managed device, you can enforce the built-in content filter.

For managed MacOS, you can enforce Apple's built-in content filter , which can optionally also limit access to Adult Content.

Built-in content filtering is similar to a blocking application that installs a browser extension. This blocking method will typically work even while a VPN or proxy is enabled.

This approach is particularly good because managed content filtering is difficult to bypass or disable from the device itself. The mobile device manager must be used to make changes.

For managed MacOS , you can enforce the built-in content filter, which can optionally also limit access to Adult Content.

Bypass Prevention Techniques

The second area of focus involves bypass prevention strategies so that blocking is enforced and not easily bypassed.

One of the best ways to harden your blocking system is to configure device restrictions using device management techniques. My approach is similar to what an IT department would do when they set up company devices.


Become a Tech Lockdown member to access step-by-step premium guides that walk you through configuring the most restrictive blocking setups.


Prevent Changing DNS Settings

On Windows, you can use a blocking application that lets you block any windows containing a certain title. This allows you to password-protect access to network settings where DNS is configured. This approach works even if you are using an Admin account.

On Mac computers, you can use a Mobile Device Manager to lock DNS settings so that even a user account with Admin access cannot easily change the DNS settings.

Get Powerful DNS Filtering

Set up filtering on all your devices and prevent common bypass techniques.

Enforcing Browser Extensions

The downside of blocker apps on Windows and Mac is that they have limited ways to prevent themselves from being disabled.

You can make a blocking application more effective by enforcing the browser extension so that it can't be disabled.

Setting up a managed browser allows you to enforce the use of extensions, like the extension that the Cold Turkey Blocker application relies on. Notice that cold turkey doesn't have the option to be removed or disabled while Google Docs can be removed or disabled:

Block Browser Extensions

In addition to enforcing DNS settings, it's recommended that you set up a managed browser so that you can block browser extensions. Blocking browser extensions makes DNS Filtering more effective and harder to bypass.

Once a browser is managed, you can selectively block browser extensions or block all unauthorized browser extensions from being installed.

Get the Guide to Managing Devices at Home

Become a Tech Lockdown member to access step-by-step guides and powerful DNS Filtering.

Disable Browser Proxy

When a browser like Google Chrome is managed, you can disable the ability to set a proxy to avoid common filter bypass techniques.

Enforce Browser SafeSearch

In addition to using a DNS Filter that enforces SafeSearch on supported search engines, you can also enforce SafeSearch in a managed browser. This is a great fallback for if the DNS Filter is bypassed.

Disable Guest Mode & New User Accounts

A common bypass method involves a user signing into a computer or browser using guest mode, which often allows the person to bypass some levels of blocking.

On managed MacOS, you can remove Guest Mode entirely and even restrict access to managing Users & Groups so that new user accounts can't easily be created.

If you've set up a managed browser like Google chrome, you can disable guest mode there as well: