I use Firefox’s Multi-Account Containers extension to allow me to sign in to personal and work accounts for the same service (e.g. Gmail) in different tabs. This works great but is a little cumbersome as I have to open the relevant container before navigating to the service.

Fortunately we can use the Containerise extension and URL redirection to improve this workflow. Containerise allows us to pattern match URLs and open them in specific containers so by generating unique URLs for Personal Gmail and Work Gmail (both redirecting to mail.google.com) we can configure Containerise to open Gmail in the relevant container.

The screencast below shows how this works, or continue reading below the video for the instructions.

The first step is to use a redirection service (e.g. TinyURL) to generate distinct URLs that will end up redirecting to mail.google.com.

A screenshot of creating a short URL on tinyurl.com

Although not strictly necessary I find it useful to bookmark this URL so that I can give it a memorable name (e.g. “Personal email”) instead of having to remember the obscure short URL.

A screenshot of adding a bookmark in Firefox

Once we’ve created URLs for Personal email and Work email we can configure Containerise to open them in the relevant containers.

A screenshot of editing the Containerise rules

With that setup we can now search the Address Bar for the relevant bookmark by starting the search with an asterisk (e.g. “* personal email”) to open our bookmark in the desired container.

A screenshot of searching bookmarks using the Firefox address bar

I’ve used Gmail in this example but I use the same technique for AWS, Heroku, Slack, Trello and more.