Focus is a Mac app that blocks distracting websites like Facebook and Reddit. Download Now

URL Blocking

Focus makes it easy to block any kind of website you can think of. Its goal is to make common blocking scenarios simple and complex scenarios possible.

It accomplishes these goals through two different URL blocking modes: Simple and Advanced URL blocking.

Simple URL blocking

The default mode for blocking is Simple URL blocking and this allows you to just specify a domain or URL to block.

Domain

For example, you can specify just the domain facebook.com and Focus will block the following URLs:

Path


Or you can specify more of the URL like facebook.com/newsfeed then Focus will only block:


But will not block

Wildcards

Finally, you can specify wildcards (*) to add even more flexibility.

If you specify facebook.com/*/about then Focus will only block:


But will not block:


Simple URL blocking works for nearly all cases and is extremely flexible. However, sometimes you need even more control. That's where Advanced URL blocking comes in.

Whitelist

Because you can use wildcards, it makes it easy to setup a whitelist which blocks all sites by default and then requires specific exceptions.

To start whitelisting remove all blocked sites and add a single rule: *

This wildcard rule says to block everything.

Whitelist Exceptions

To add exceptions to the whitelist, add new sites with a plus sign ( +) before the URL. This tells Focus to add an exception for this rule. For example, you can block all URLs except for one website

  • *
  • +google.com

These two rules would block everything except for Google.

Another common case for exceptions is blocking a domain, but allowing a specific sub-page (like blocking all of Facebook, but allowing your work page):

  • facebook.com
  • +facebook.com/importantWorkPage

Whitelists and exceptions offer a ton of flexibility for building block lists.

Advanced URL blocking with Regex

Advanced URL blocking is available when you need more even control over URL blocking, and provides direct access to regular expressions.

Regular expressions in Focus are denoted by a beginning and ending forward slash.

For example, the following expression blocks Facebook.com:

/https?://(www\.)?facebook.com/

When is this useful?

When you have a really complex URL to block that can't be expressed with regular Whitelist Exceptions.

For example, say you wanted to block access to something that Focus doesn't handle by default, like FTP.

With regular expressions, you could add the following rule and block a specific FTP server:

/ftp://ftp.ed.ac.uk/

Of course a much more complex rule can be used, and the Whitelist Exceptions can actually be used in conjunction with regular expressions to create whitelist rules that are even more powerful:

/ftp://.*/

+/ftp://ftp.ed.ac.uk/

This rule would block all FTP servers, but allow ftp.ed.ac.uk.

Watch Tutorial

Watch a tutorial on how to block websites and apps using Focus.

Need help?

Contact support@heyfocus.com if you have any questions about Focus.

Stay up to date with the latest Focus updates and news