Force a link to use specific browser?

Is it possible to have a link in a RTF document automatically open a specific browser (Chrome vs Safari) when clicked, instead of the default?

I know I can control-click and select “Open with”, but I was wondering if there’s a way I can code it into the link itself, so that I don’t have to remember which is which.

Perhaps:

Alas, according to what I looked up, it looks like macOS doesn’t support custom URL schemes.

Hm. x-DEVONthink-item links work. Others do, to.

This

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump URLSchemeBinding

in Terminal gives you a list of the supported URL schemes. And on my Mac, there’s nothing that even remotely resembles Chrome or Safari.

For the heck of it I installed Edge, which gave me the microsoft-edge: URL scheme. And, lo and behold, open microsoft-edge:https://spiegel.de opens Edge to the website https://spiegel.de.

Conclusion: Edge seems to be the only browser that installs a URL scheme in macOS. And that works.

Yeah, sorry, I mean macOS doesn’t support URL schemes for other browsers. Good to know about Edge, but I’m sticking with Safari and Chrome for now. I tried lsregister and confirm none exist for Chrome on my Mac (OS 15.7).

Thanks for confirming for me.

I know that I’m sounding pedantic, but that is not a macOS issue. It’s the browsers that do not register their URL scheme, if they have one.

In addition, I found that one:

which might (just might) be helpful. I’ll give it a try.

1 Like

There are some apps that help with things like this. I use this one:

1 Like

There is also Choosy:

2 Likes

Choosy and Velja look like interesting options. Thanks @oddballs and @mbbntu.

And then there’s BTT, where you could define a named trigger. I had a short exchange with its creator here:

He proposed a fairly simple approach (imo). However, the links will get kind of bloated.

I don’t have BTT, but this got me wondering if Keyboard Maestro could do this. This answer is “yes, in a manner”.

KM has a URL scheme that can launch a macro, and that can take a variable. But from this post in their forum, it looks like the scheme cannot accept any slashes in that value: the value has to be URL encoded (confirmed in manual). So if your URL has any slashes (the ones I’m using do), you’d have to encode all of them in the link first, which can get messy.

But there’s another way. The links I want to specifically open in Chrome are from saved Google Gemini chats. Since each chat has a unique ID number, I can just use that as the variable, and have the macro add it to the Gemini URL.

Here’s the macro:

Then:

  1. If my Gemini URL is: http://gemini.google.com/app/8214test4977144
  2. I add a link in DEVONthink: kmtrigger://macro=gemini&value= 8214test4977144
  3. And it will open that chat in Gemini within Chrome.
1 Like

Second vote for Choosy, which is what I run. I have a lot of customisation set up because I use my personal device for work and run two browsers (Safari and Firefox), so have all sorts of rules regarding where a link is clicked, how to handle specific URLs, etc. I even have one that pushes Zoom meeting links straight to the app so that I don’t have to faff about in the browser (very much a quality of life improvement if you have a lot of meetings in your diary!).

3 Likes

Why? Shouldn’t browsers behave identically in 2026? (Not asking about the Zoom stuff, which I can understand).

A couple of reasons, which can mostly be filed under “you should use separate profiles on your computer for work and personal” :joy:

But basically, the privacy settings I have are different in the two browsers because my employer uses a Google Workspace and that doesn’t work with some of the privacy settings I use online. So I want all work app links to open in the browser I use solely for work which has “lighter” privacy settings and Google works. But I don’t want all my work reading in that browser, because there’s a couple of websites I use that I read outside work too and have nice little workflows set up.

I find that Safari’s print to PDF functionality is a bit nicer than Firefox’s, and where there are websites where I know printing to PDF is often needed, I’d rather it went straight to Safari.

The YouTube extension in Firefox is amazing and strips out all ads, tracking, comments, and allows setting of default colours and volume etc., so I want all YouTube links to go into Firefox regardless of whether it’s work or personal.

Finally, Apple is still a bit weird about how the sharesheet works in non-Apple browsers so for websites where I know I sometimes use sharesheet, it’s easier to just have them open in Safari.

2 Likes

At least one Zoom-like app we use in TV post production (Louper) throws up a warning if you open a session link in anything other than Chrome. Since those links get sent to lots of non-tech people I like to include that info when they get their first link to a session so they don’t have to fumble around.

On my own system I like the “open with..” option in DT for this reason and miss it in Slack and other channels where it defaults to using the default browser to open any links from a chat.

I’ll be looking in to Choosy because @MsLogica has a good track record of recommending things I’ve found interesting and useful.

2 Likes

High praise, thank you! I can’t really take credit though, as I get a lot of recommendations from this forum!

I recently found openany that does this and a bit more for any app and document pair.