Advanced URL Blocking
Focus was built from the ground up to be ridiculously simple.
The majority of its default blocking rules and features, as covered on the URL Blocking page, will handle almost any situation you come across.
But sometimes you want that extra boost of power to take your productivity to the next level.
This page covers two primary methods for advanced blocking.
Advanced Website Blocking Method #1: Regular Expression (Regex) Blocking
Before we get started, please note that an extensive Regular Expression tutorial is beyond the scope of this page.
If you want some easy-to-follow tutorials for getting up to speed, check out the two links below:
- RegexOne: This website will help you learn Regular Expressions using interactive tutorials and simple instructions.
- Regular-Expressions.info: A comprehensive database for anything you need to know about learning and using Regular Expressions, jam-packed with visual examples.
Also, this advanced URL blocking method works when you are using a Blacklist (i.e. a list of websites you want Focus to block while it’s running).
To use this method, click the Focus menubar icon, selected Preferences, go to the Blocking tab and make sure you are on the Websites tab:
With Regular Expression, you want your entry to start and end with a forward slash (/).
As an example, say you want to block Google searches for the term “goal”.
Click on the "+" icon at the bottom of the Websites blocklist and input the following line:
You will be able to use Google while Focus is activated (assuming it isn’t blocked), but you will be blocked if you attempt to use the search term “golf”
You can imagine how versatile Regular Expressions can be for preventing yourself from getting lost on sites powered by search engines!
If you have any questions about this method, please do not hesitate to contact support at [email protected].
It involves a fair amount of technical know-how and willingness to use a complex programming language, which can be off-putting to users with simpler needs.
Advanced Website Blocking Method #2: Allowed Site Exceptions
Please note that this advanced blocking method works when you are using a Whitelist (i.e. a list of websites you want Focus to allow access to while blocking the rest of the Internet).
To use this method, you will need to be familiar with how the Allowed Sites feature works.
Allowed Site Exceptions is perfect for situations when you want to block an entire site while allowing a few exceptions on that site.
Let’s say you want to block all of Facebook while only allowing two pages you use for getting stuff done at work.
Click the Focus menubar icon, selected Preferences, go to the Blocking tab and make sure you are on the Websites tab:
Locate the text that says “Block these websites”, click on the word “Block” and select the Allow option within the drop-down list:
Here, we are going to use three entries:
Line 1 tells Focus to block the entire Facebook domain
Lines 2-3, however, have a “+” sign before the URL.
Doing so tells Focus to keep ALL of Facebook blocked except for the two URLs we provided.
Here’s what the final result looks like:
Adding another exception to this rule would be very simple.
Add a new entry below line 3, insert the “+” sign and paste in the URL of the specific Facebook page you want access to while Focus is turned on.
As you are starting to see, it’s really easy to use this advanced URL blocking method for building the perfect productivity set-up.