Easily open the same service (e.g. Gmail) in different Firefox containers
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.
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.
Once we’ve created URLs for Personal email and Work email we can configure Containerise to open them in the relevant containers.
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.
I’ve used Gmail in this example but I use the same technique for AWS, Heroku, Slack, Trello and more.