Todd Wolven
Theme

URL Router

By Todd Wolven · Updated 2026-08-15 · Source on GitHub

URL Router is a small, local-only Windows protocol handler that opens different links in different browsers. It runs only when another application opens an HTTP or HTTPS link, launches the configured browser, and exits immediately.

Install

Download UrlRouter-Setup-x64.exe from the latest GitHub release. The installer opens rules.json for editing and then opens Windows Default Apps. Assign both HTTP and HTTPS to URL Router.

The installer is currently unsigned, so Windows SmartScreen may show an unknown-publisher warning. Release checksums are published alongside each installer.

Configuration

The installed configuration is %LOCALAPPDATA%\Programs\UrlRouter\rules.json. An annotated starting point is provided in config/rules.example.json.

{
  "defaultBrowser": "edge",
  "browsers": {
    "edge": { "executable": "auto:edge", "arguments": [] },
    "brave": { "executable": "auto:brave", "arguments": [] },
    "chrome-work": {
      "executable": "auto:chrome",
      "arguments": ["--profile-directory=Profile 1"]
    },
    "firefox": { "executable": "auto:firefox", "arguments": [] }
  },
  "rules": [
    {
      "scheme": "https",
      "host": "github.com",
      "pathPrefix": "/example-org",
      "browser": "chrome-work"
    },
    {
      "scheme": "https",
      "host": "portal.example.com",
      "pathPrefix": "/",
      "browser": "firefox"
    }
  ]
}

browsers is a named dictionary, so it can contain as many entries as needed. A route's browser value selects one entry. Use different names with different arguments to target multiple profiles in the same browser.

Built-in discovery aliases are auto:chrome, auto:brave, auto:edge, and auto:firefox. For any other browser, set executable to an absolute path. Environment variables such as %LOCALAPPDATA% are expanded.

Matching is structural rather than a raw string prefix. Hostnames must match exactly, and /example-org matches that path segment and descendants but not /example-organization. Lookalike domains such as github.com.evil.example do not match github.com.

For allowlisted Microsoft Teams and Outlook Safe Links wrapper hosts, URL Router locally decodes the url query parameter for rule matching. It still sends the original wrapper URL to the selected browser, preserving Microsoft's reputation check. It never follows redirects or contacts the wrapper itself.

Test a rule

UrlRouter.exe --test "https://github.com/example-org/project"

This prints the selected browser without opening it. Set URLROUTER_CONFIG to test another configuration file.

Build

Requires the .NET 9 SDK:

dotnet publish src\UrlRouter\UrlRouter.csproj -c Release -r win-x64 --self-contained true -o publish

The installer is built with Inno Setup 6:

iscc installer\UrlRouter.iss

Privacy and security

URL Router parses URLs locally and never contacts a server. Successful URLs are not logged. Only startup, configuration, and launch failures are written to %LOCALAPPDATA%\UrlRouter\errors.log.

Browser processes are launched with .NET's argument-list API rather than concatenated shell commands. Rules compare parsed URI components to prevent hostname-prefix and user-info lookalikes.

Author

Todd Wolven - Lead AI Software Developer and open-source GenAI engineer

License

MIT. Copyright © 2026 twolven. Redistributions must retain the copyright and license notice.

This page is generated automatically from the GitHub README, which is the single source of truth.  ← Back to toddwolven.com