Contextually Opening Links in Different Web Browsers via BrowseRouter

Contextually Opening Links in Different Web Browsers via BrowseRouter

I work from home full-time on my personal computer. As such, I spend a lot of time (probably excessively so) optimizing my PC and desk setup to be comfortable and efficient whether I'm sitting here during my 9-to-5 or not.

Since the PC is split between work and personal use, I run two web browsers in order to keep things bucketed out and separated as much as possible: Chrome for work and Vivaldi for personal. I could use browser profiles to manage everything, and I used to, but I just find it significantly simpler to run two browsers. It keeps that division simple to manage: all bookmarks remain separate, logins don't conflict, cache-clears don't wipe my personal history, etc. Way better.

While I generally work primarily in Chrome, I do also run a few different work-related programs during the day. Not many, but a few with fairly frequent use.

Herein lies the annoying issue:
I want Vivaldi, my personal browser, to open all links be default. Vivaldi is set as the default in my PC settings. However, often I need to click a link from within a work-related program, for example, when setting up Claude I need to authenticate with my work email account in Chrome. This results in either:

  1. I need to manually go into my Chrome or PC settings and temporarily set Chrome as by default browser, click the link, then go back and reset Vivaldi as the default. Or
  2. I forget to do this, click the link, which then opens in Vivaldi where I am not logged in to my work account.

Minor, but annoying and something that seems like it should be easily fixable. I am probably too particular with how I want things to work, but if I'm annoyed, someone else inevitably is as well.

I don't recall if I stumbled across BrowseRouter or Linklever first, but both accomplish what I want. Linklever is likely a bit more simple for anyone less technically-inclined, with a GUI and support for Mac and Linux in addition to Windows, but it also requires a $30 licence (and honestly I didn't love the UI when I tested it) and a browser extension, whereas BrowseRouter is free and does pretty much the exact same thing with a few lines of easily-readable JSON.

Setup is simple. Visit the BrowseRouter GitHub link and download the ZIP containing the latest release (which is 0.19.0 as of right now), unpack and park it somewhere on your PC. I have it living at AppData\Local\BrowseRouter. As per the instructions:

  1. Download the latest release.
  2. Open config.json and filters.json and customize as desired.
  3. Run BrowseRouter.exe without arguments. No need to run as admin. It will register with Windows as a web browser and open the Settings app. To unregister, run it again. If you later move BrowseRouter to a new folder, or rename the exe, run it again to update the registration.
  4. In the settings app, set BrowseRouter as the default browser.

So BrowseRouter becomes your default "browser" and when a link from any program is clicked, it first goes through BrowseRouter's settings to determine what should actually occur.

The config.json file is what determines that routing logic, while filters.json provides some options for URL formatting like remoting tracking parameters. My config is set up as follows:

{
  "notify": {
    "enabled": false,
    "silent": true
  },
  "log": {
    "enabled": false
  },
  "browsers": {
    "vivaldi": "path\to\vivaldi.exe",
    "chrome": "path\to\chrome.exe\" --profile-directory=\"Profile 3\"",
    "chrome-shared": "path\to\chrome.exe\" --profile-directory=\"Profile 4\""
  },
  "rules": [
    { "url": "merchants.google.com", "browser": "chrome-shared" },
    { "source": "* -> Wispr Flow", "browser": "chrome" },
    { "source": "* -> claude", "browser": "chrome" },
    { "source": "* -> Slack", "browser": "chrome" },
    { "source": "* -> Discord", "browser": "vivaldi" },
    { "url": "*", "browser": "vivaldi" }
  ],
  "filtersFile": "filters.json"
}

Even if you're not familiar with code, that snippet above should make a decent amount of sense. The syntax is pretty simple to follow along with.

The notify section determines whether a notification pops up as a link is routed, with or without a sound, while the log section will generate usage logs if you need to do any debugging.

browsers is where you set up the various web browsers you want to include in the routing process. Simply specify the browser and the path to the executable file. Additionally, arguments can be passed through to provide some additional options; in my case, I primarily work in one Chrome profile but do occasionally need to access a second profile that my team shares, noted after the .exe file path as --profile-directory=\"Profile 3\. To find the Profile # (in Chrome at least), visit chrome://version/ and you'll see it a few lines down.

The next section, rules, determines the logic for routing. In order or priority, you are either able to specify a URL that needs to open in one browser vs another, or links from a particular application that needs to do the same thing. In my example, I have:

  1. Google Merchant Centre links set up to open in my shared Work Chrome profile.
  2. Links from a handful of Work apps opening in Chrome.
  3. Links from Discord, which I use for my homelab notifications, opening in Vivaldi. This is probably redundant due to the item below.
  4. The catchall for all other URLs, set to open in Vivaldi.

That's it. Easy to set up, easy to configure and update, and I no longer have to do the default browser dance.

This is one of those pieces of software that I wish I'd looked for years ago, though I will note that a quick Google search for "open specific links in different browsers" doesn't provide a ton of options. There do appear to be a few others, namely Velja (Mac only) or OpenWith (paid), but BrowseRouter is what I came across first that checks all of my boxes.





Find this helpful and/or entertaining?

Consider buying me a coffee.


Buy Me A Coffee