Block Website Keywords

How to Block Websites based on Keywords

Content Blockers allow you to block specific websites, categories, and apps. What if you want to block a website that uses a word in it's URL?

techlockdown logo
Tech Lockdown Team
Updated June 22, 2024

If you have ever tried to block content online, you might be familiar with services that let you block based on a category or domains that you specify. However, it's also possible to block websites based on keywords used in the URL.

For example, say that you want to block any websites related to a certain fast food chain. If you could block any website with the word "mcdonalds" in the title, then you can block both the main website and any fanclub websites. However, you won't block the Wendys website, which would normally be a problem if you tried blocking any website that fits under the category of fast food.

This is an admittingly silly example, but it does bring up a good use case for blocking websites based on keywords.

URL Vs DNS: Which Keyword Filtering Approach Should you Use?

Before we go any further, it's important to distinguish between keyword blocking using DNS-level filtering and keyword blocking with full URLs.

DNS Filtering is an efficient way to block content based on the domain name. A DNS Filtering service can classify the domain names of websites that can be found online.

An example of a domain is If you look up this domain using a DNS classification tool, like Cloudflare Radar , you'd see that it's classified as a search engine.

Now let's go back to our example about blocking certain fastfood keywords. When blocking keywords on the DNS-level, the filter is only able to examine keywords within the domain name, not any specific pages.

Using DNS to block based on keywords would let you match entire websites, but not sub-sections of a website, such as a subreddit or specific search on Google.

URL filtering, in contrast, allows you to match both the domain and pages within that domain.

With this approach, you could block websites that are dedicated to that topic or specific sections of a mixed-content website where that word is used in the page path. You can even block searches that use this word.

Drawbacks of URL Filtering

If you look at the available approaches, you might assume that you should simply use a solution that lets you filter entire URLs, not just a domain. However, there are some trade-offs that you should consider.

1. Device Support

First, blocking based on keyword using DNS filtering will reliably work across all devices. 

If you set up a DNS Content Policy to block based on keywords, you'll have some confidence that this approach works on your home router, computer, or smartphones that are connected to your content policy.

URL filtering, in contrast, may not work reliably across your devices. For example, this method may not be available on your Home Router or your iPhone.

2. Performance

Another consideration is performance. Compared to URL filtering, DNS filtering based on domains is much more efficient. This is because URLs can have significant length compared to a domain name.

3. Conflicts

Conflicts are common when blocking URLs containing keywords while domain filtering tends to have fewer collisions. For example, URL filtering rules can become complicated and you may find that you wrongly block webpages.

4. Reliability

URL filtering may not provide a reliable blocking experience. It's common for domains to use descriptive words in their name, but some websites do not include descriptive words of webpages within their website.

For example, a webpage may have a path like /index.html, or /page-id-12. This would be difficult to target with a URL filter, but the underlying domain name would probably have a descriptive keyword.

Our recommendation is to block keywords on the DNS-level, but to use URL filtering for specific use-cases. We'll get into this more later on.

Blocking Websites that use Keywords in the Domain

While you can't use a DNS Content Policy to block specific URLs, you can define which words you definitely don't want allowed on your connected devices.

Looking back at the McDonalds example, you might try blocking all websites that fit under the restaurant category. However, as we saw then, this might not apply to a fan club website.

Block Keywords in Domains

The exact instructions to do this will depend on which platform you decide to use. Tech Lockdown allows you to create rules on your own Content Policy that block keywords that are found in the domain of a website:

Here's how you do this with our Content Policy:

Default-Deny Approach

One of the advantages to blocking based on keyword using DNS is that you can easily do a default-deny approach. For example, you could block an entire category like Food & Drink, but selectively allow domains with certain words even if they are categorized as Food & Drink.

Here's how you do this with our DNS Content Policy :

There's another scenario for keyword blocking that you might be able to solve without blocking based on keyword.

Let's say you want to selectively allow approved social media apps. With our DNS Content Policy , you could block the entire social media category, but then create an Allow rule that excludes LinkedIn.

With this approach, blocking based on keyword may not be necessary at all.

Get Powerful DNS Filtering
Get Powerful DNS Filtering
Create and enforce a Content Policy on all your devices.

Blocking Websites with Full URL Filtering

URL filtering can inspect the entire URL when determining if a page should be blocked.

This would allow you to block specific searches based on keyword or pages within a website without blocking the entire website.

URL Filtering Browser Extensions for Mac and PC

On Windows and Mac computers, you can download browser extensions for Microsoft Edge, Google Chrome, and Brave Browser that can block keywords based on the full URL of a webpage. This can make it possible to block search terms or pages within a website.

A program that we've extensively tested (and highly recommend) is called Cold Turkey Blocker .

It is a program designed specifically to filter URLs on a computer, all while making itself difficult to disable. It utilizes an extension that it adds to your browser to do this.

Let's take a look at different ways you can use it to filter URLs.

Block Based on Keywords Used in the Full URL

If you want to block pages with a website based on a keyword used in the URL, you can use this browser extension to check both the domain and the path in the URL to see if a disallowed keyword is used.

Why the asterisks?
These are called "wildcard" expressions. It tells the software to look for any term in a URL that matches the word, regardless of what other text is around it.

You should now get a blocked page anytime you try to access a website with your keywords in either the domain or a path in the URL.

Block Keyword Searches

Most pages will add information to the URL in your web browser to tell the website which words to search for:

To create an entry to specifically target keyword searches, and not domains or pages within a website, you can add asterisks around terms you want to block. You will need to include the terms: "q" or "search_query" in the expression to make sure the block only applies to searches.

For example, if you want to block the word fruit, it could look something like this:

This would block the search term "fruit" on Google, YouTube, and any other website that uses q= or search_query=.


Block Based on Words Used in Title of Webpages

Lastly, you can also block a website based off of its title displayed on your web browser. While not nearly as effective as filtering the URL, it can come in handy with certain websites.

You can also use this to block the titles of applications installed on your computer, for example, if you want to disable the Network Connections menu on Windows machines:

We highly recommend checking out our review for Cold Turkey to get a better idea about how to use it more effectively.

Using Screen Time on iOS to Block Specific URLs

For iPhone and iPad users, you may be able to use the built-in Screen Time settings to block specific website URLs. While we don't recommend relying on Screen Time entirely for blocking content online, it is an excellent additional layer of protection.

You should see two Add Website rows now.

You could use a default-deny approach by adding the entire domain to Never Allow while excluding a specific page from being blocked.

Keep in mind that this approach is difficult to maintain and has some reliability issues. We don't recommend depending on this as a primary way to filter specific URLs.

Android Blocker Apps that Use the Accessibility Service

It's possible to download content blocking apps from the Android app store that have URL filtering capabilities.

Not all blocking apps can do this, however - they have to utilize Android's accessibility services like the Screen Reader.

Get Powerful DNS Filtering
Get Powerful DNS Filtering
Create and enforce a Content Policy on all your devices.
Open chat