Journal / · 5 min read
How to open links in different browser profiles on a Mac
macOS sends every link to one default browser. Here’s how to keep work and personal browsing apart anyway.
Many people keep work and personal browsing in separate browser profiles, or in separate browsers entirely. It keeps cookies, extensions and history apart, and it stops you from opening the company dashboard while signed into the wrong account. The trouble starts when you click a link in another app.
Why links open in the wrong place
macOS has exactly one default web browser, set in System Settings → Desktop & Dock → Default web browser. Every link you click in Mail, Slack, Messages or Terminal goes to that browser, and usually to whichever profile was used last. macOS has no concept of “this link is for work”.
Option 1: one browser for work, another for everything else
The simplest reliable setup is to use two different browsers, for example one for work and one for personal browsing, and make the one you click into most often the default. Links from other apps all go to the default; you copy the occasional work link across by hand. It’s crude, but it never surprises you.
Option 2: open a specific Chrome profile from Terminal
Chromium-based browsers can open a link in a specific profile from the command line. Profiles are folders in ~/Library/Application Support/Google/Chrome/, named Default, Profile 1, Profile 2 and so on.
open -na "Google Chrome" --args --profile-directory="Profile 1" "https://example.com"
You can wrap that in a Shortcut or a small script and assign it a keyboard shortcut. It’s useful for opening your work dashboards in the right profile every morning, though it doesn’t help with links you click.
Option 3: containers inside one browser
Firefox’s Multi-Account Containers extension keeps sites in separate containers within one window, and can always open a given site in a given container. If you live in Firefox, this handles most cases without changing the default browser.
Option 4: a link router
The complete fix is a small app that registers as the default browser and decides where each link should go: by the app it came from, by its domain, or by asking you. That’s what we’re building Links to do. A rule like “links from Slack to our company domain open in Chrome, Work profile” means you never think about it again.
Choosing
If you rarely mix the two, two browsers is enough. If you mix them all day, routing by rule saves a surprising number of wrong-account moments.