Skip to contentSkip to footer

If you want to be kept up to date with new articles, CSS resources and tools, join our newsletter.

Many development servers will automatically open their URL when you launch them, and without configuration that happens in your default browser. If you use a separate development browser, like Polypane, that can be annoying because you'll then have to re-open them in your development browser. While you can configure each of your projects to use a browser other than your default browser, you'll have to configure that for every project you work on.

What if instead you could always open localhost in your development browser while opening all other URLs in your regular browser?

Here are some tools for macOS, Windows and Linux that let you do just that!

macOS

On Mac you can use Choosy or Velja if you prefer a GUI, or Finicky if you prefer creating your own config file:

Finicky

Finicky logo

Finicky uses a .finicky.js file in your home directory that lets you configure precisely which URLs should open in which browsers. Follow the installation instructions for Finicky, then add the following handler to your .finicky.js file to open all localhost URLs in Polypane.

module.exports = {
  defaultBrowser: 'Google Chrome', // Or "Safari", "Firefox" etc.
  handlers: [
    {
      match: /^https?:\/\/localhost.*$/,
      browser: 'Polypane',
    },
  ],
};

Installation and configuration

To use Finicky, download it or install it using Homebrew: brew install --cask finicky. Then create a .finicky.js file in your home directory using the above and start Finicky, allowing it to be set as the default browser.

Finicky can do other things as well, like rewriting your URLs. Check out the full Finicky documentation for all the available options.

Choosy

Choosy logo

If you prefer having a GUI to configure your rules then check out Choosy! This application can either prompt you when you open a new URL, or you can configure rules to open specific URLs in specific browsers, and comes with a UI to configure different rules.

Installation and configuration

You can download Choosy from the website, choosyosx.com and try it for free for 44 days, after which you can buy a license for $10.

To set a rule to always open localhost in Polypane, go to the Rules tab and add a new rule:

The Choosy UI with the 'rules' tab and the 'plus' button highlighted

Give the rule a name like "localhost" and select the "matches this regular expression" option after "website". Add /^https?:\/\/localhost.*$/ as the value. Then select "Always use this browser..." below "When this rule applies, Choosy should..." and click the "Change" button and select Polypane.

The Choosy UI with a popup to add a rule.

Now your localhost URLs will open in Polypane.

Velja

Velja logo

Another GUI option is Velja. It's a very new app but it has a number of interesting features: You can configure a number of different apps, like Figma, Zoom and Notion to automatically open their own links in the app instead of in the browser, and you can let it automatically clean tracking parameters when copying links.

Installation and configuration

You can download Velja for free from the app store. It's a sandboxed app, so when you first launch it it will walk you through everything it needs access to, and asks to be set as the default browser.

To set a rule to always open localhost in Polypane, go to the Rules tab in the preferences and add a new rule:

The Velja UI with the 'rules' tab and the 'plus' button highlighted

Give the rule a name like "localhost". If you want you can leave sample URL empty, or add your default localhost URL. Keep "detect via" set to Domain, and for "Match" select Polypane.

The Velja UI with a popup to add a rule.

Now your localhost URLs will open in Polypane.

Browserosaurus

Browserosaurus logo

An honorable mention here is Browserosaurus. This is an open source application developed by Will Stone that will prompt you whenever you try to open a URL.

screenshot of Browserosaurus

Though it doesn't have any rules to automatically send URLs to specific browsers, you can add a shortcut to your development browser (Like "P" for Polypane) and press that when the prompt is shown to open links in Polypane.

Installation

You can install Browserosaurus by downloading the right version from their Github releases page (x64 for Intel, arm64 for M1) or install it using Homebrew: brew install --cask browserosaurus.

Windows

On Windows you can use Account surfer if you prefer a GUI or BrowserSelector if you prefer a configuration file.

BrowserSelector

BrowserSelector uses a BrowserSelector.ini file saved next to the BrowserSelector.exe file. Follow the installation instructions for BrowserSelector, then add the following to your BrowserSelector.ini file to open all localhost URLs in Polypane.

[browsers]
polypane = C:\Program Files\Polypane\Polypane.exe

[URLs]
localhost = polypane
/localhost\:*/ = polypane

Installation and configuration

First, download the latest release from GitHub. Extract BrowserSelector.exe and BrowserSelector.ini in a folder you can easily get to with the terminal. Then open BrowserSelector.init using Notepad and add in the Polypane lines in the code box above under [browsers] and [URLs]. Save and close the file.

Next, open your terminal, go to the folder you extracted BrowserSelector in and execute the command .\BrowserSelector.exe --register. This will prompt an admin check asking you if you want BrowserSelector to make changes to your installation. Allow this, then go to your Default apps settings and select "DanTup.BrowserSelector" as your default application.

The windows default apps settings showing how to select BrowserSelector

That's it, now all localhost URLs are opened in Polypane.

Account Surfer

Account Surfer logo

Account Surfer is a GUI application that lets you choose which browser and browser profile to use when you click on any link and optionally lets you remember that choice for future use.

Installation

You can get Account Surfer on the Windows store for $6.99. When you first launch the app it asks you to set it as the default browsers, which you can do by clicking through to the settings, scrolling down to the "Web Browser" setting and choosing Account surfer when prompted.

The windows default apps settings showing how to select Account Surfer

After you have set Account Surfer as the default browser you'll see the overview of browsers:

The main Account Surfer interface

Click through to settings. There you will find the header "Saved domains" with a list of browsers below it. Click the "+ domain" button under "Polypane".

The Account surfer settings

Add the localhost domain to Polypane and press "Save" to have Account Surfer always open Localhost URLs in Polypane.

Account Surfer does not support regular expressions yet, so if your dev server uses a specific port, like 8000, make sure to add that localhost:8000 to the domain.

Adding a rule to the account server settings

Linux

Bowser

Bowser logo

On Linux there is Bowser, which is available as a stand-alone application or a Gnome extension. Follow the instructions on the link to set up the Gnome extension, which adds a little icon in he Gnome bar where you can set up your preferred browser:

Bowser gnome extension popup

Installation

If you don't use Gnome, then the stand-alone application works for you. First check out the repository:

git clone https://github.com/blipk/Bowser.git

If you don't have python3 and python3-tk, make sure to install them first: sudo apt install python3 python3-tk or sudo yum install python3 python3-tkinter depending on your version of Linux.

In the Bowser folder, run the bowser.py file:

python bowser.py

If python 3 is not your default python, you need to switch out python for python3, as well as in the first line of bowser.py.

This will install and setup Bowser for you as well as set it as the default browser. Once installed the configuration window will appear:

Bowser configuration window

Here, click the "new rule" button, and in the popup you see fill in localhost and press OK:

Bowser New rule dialog

Then select the new "localhost" rule and at the bottom of the configuration window click on your default browser (Firefox in my case) and select Polypane in the dropdown.

Bowser configuration window with localhost option selected

Lastly, if you don't want Bowser to show a popup for every new link, uncheck "Create rules for new links" under the "Settings" menu. Once done, you can close the configuration window and everything is set up! If you want to change or update your configuration, run python bowser.py again.

Roll your own

If you're feeling adventurous, This superuser answer explains how you can setup an xdg-open script: redirect certain URLs to specific web browsers in Linux.

It depends on a few different settings like which grep and *-open (like gvfs-open, kde-open etc) you have, so you'll have to see what works for your setup.

Alternative: our browser extensions

If you don't want to run a separate tool as your browser, an alternative for Polypane is to run our browser extensions.

These add a Polypane button to your browser chrome that you can click to open the current page in Polypane, so when localhost does get opened in your default browser, a single click sends them straight to Polypane.

Polypane has browser extensions for Chrome, Firefox, Edge, Opera, Brave, Vivaldi and Safari, all available on our download page.

Know other ways?

If you know other applications, please let us know and we'll update the article!

Build your next project with Polypane

  • Use all features on all plans
  • On Mac, Window and Linux
  • 14-day free trial – no credit card needed
Try for free
Polypane screenshot