Open links in the right Chrome profile on Mac
On a Mac, a link clicked in Slack or Mail opens in whichever Chrome profile you used last. There are three ways to choose the profile instead: a Terminal command with --profile-directory, a link-router app set as your default browser, or Air Traffic Control rules in JustSidebar.
By the JustSidebar team · Last updated
Why links open in the wrong profile
macOS knows about browsers, not about profiles. When you click a link in another app, macOS hands the address to your default browser and nothing else. Chrome then opens it in the profile whose window was active most recently. If you were last in your personal profile, that's where the work ticket opens.
Method 1: a Terminal command
Chrome accepts a command-line switch that names the profile. It comes from Chromium and isn't described in Google's help pages, so check that it behaves as described on your Mac. First find the profile's folder name, which isn't the name you gave it:
- In a window of the profile you want, go to
chrome://version. - Read the line Profile Path. The last part is the folder name:
Defaultfor the first profile, thenProfile 1,Profile 2and so on. - Open a link in that profile from Terminal:
open -na "Google Chrome" --args --profile-directory="Profile 1" "https://example.com"To save typing, add a function per profile to ~/.zshrc:
work() { open -na "Google Chrome" --args --profile-directory="Profile 1" "$@"; }
home() { open -na "Google Chrome" --args --profile-directory="Default" "$@"; }Then work https://example.com opens the page in the work profile. This costs nothing and needs no app, but it only helps for links you open yourself from a terminal or a script. It does nothing for a link you click in Slack.
Method 2: a link-router app
A link router is a small app you set as the default browser. It receives every clicked link, applies your rules, and forwards the link to a real browser, optionally to a given profile. Two established ones on the Mac:
- Velja: rules are set in a settings window, by source app or by address, and can target a browser profile.
- Finicky: open source, configured with a JavaScript file, which makes it very flexible if you're comfortable editing one.
Both can route by the app the link came from ("everything from Slack goes to Work"), which JustSidebar doesn't do. If link routing is the only thing you're missing, one of these is the right tool.
Method 3: Air Traffic Control in JustSidebar
JustSidebar includes the same idea under the name Arc gave it. You set JustSidebar as the default browser and add rules in Settings › Links:
| Condition | Text | Space (Chrome profile) |
|---|---|---|
| Contains | atlassian.net | Work |
| Contains | github.com/acme | Work |
| Starts with | https://mail.google.com/mail/u/1 | Personal |
The first matching rule decides; a link that matches nothing opens in the Space you used last. Since each Space is a Chrome profile, routing to a Space is routing to a profile. The difference from a standalone router is what happens next: the sidebar switches to that Space, so the link opens with its folders and favorites beside it. Details on the Air Traffic Control page.
Which one to pick
| You want | Pick |
|---|---|
| To open a profile from scripts or the command line | The Terminal flag |
| Routing by source app, or between different browsers | A link-router app |
| Routing by address, plus an Arc-style sidebar with Spaces | JustSidebar |
| Nothing to install | The Terminal flag, and switching windows by hand |
The same flag works for Brave and Edge with their own app names ("Brave Browser", "Microsoft Edge"), since both use Chromium's profile folders.
Keep reading
- Air Traffic Control Links you click in Slack, Mail or any app open in the Chrome, Brave or Edge profile you choose, by simple rules. Arc's Air Traffic Control, back.
- Arc Spaces in Chrome Chrome has no Spaces, but profiles do most of the job. Set up one profile per Space, switch between them quickly, and keep each one's pinned links.
- Spaces Chrome has no workspaces like Arc's Spaces. In JustSidebar, each Space opens in a real Chrome, Brave or Edge profile, with its own folders and favorites.
Keep your browser. Get your sidebar back.
JustSidebar for macOS 15 Sequoia and later. $29 one-time, 7-day free trial.
Download for Mac