Adding a search engine to Firefox


2024-05-23 // 207 words // ~2 minutes



Some site-specific search engines don't support OpenSearch discovery, and adding them as search engines to Firefox can be pretty annoying. Here's how to do it.
A screenshot of a Firefox window, showing the dialog for adding a new search engine
A screenshot of a Firefox window, showing the dialog for adding a new search engine

Search engines in Firefox are specified by either OpenSearch tags or Firefox Add-ons. This makes it really difficult to add site-specific search engines that don't support either of these (like Hacker News's site search).

This is quite different from most Chromium-based browsers, where you can add any site-search engine by specifying its URL with a %s, which is then substituted with the actual search query.

However there is a way to replicate this behaviour in Firefox, although it is hidden behind a flag and not exactly straightforward to enable.

This is how you can enable it in Firefox:

A screenshot of a Firefox window, showing the browser.urlbar.update2.engineAliasRefresh option in about:config

  1. Open about:config

  2. Type in the following in the search bar:

    browser.urlbar.update2.engineAliasRefresh
    
  3. Make sure that boolean is selected, click on the + button, and set it to true

Done!

Now, when you navigate to Settings > Search (about:preferences#search), you'll find a new “Add” button under the Search Shortcuts list. Just click on it to add a new search engine.

A screenshot of a Firefox window, showing the dialog for adding a new search engine

Comments

Comment via