'Adding A Custom Search Engine To Firefox [closed]

I need to add a custom search engine to Firefox. I have a name and a search url.

  1. What options should I change in %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\prefs.js file?

  2. Do I need to create a distinct xml file for new search engine in one of these folders?

    • %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\searchplugins

    • %PROGRAM_FILES%\Mozilla Firefox\searchplugins

  3. Should I modify %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\search.sqlite sqlite database file?



Solution 1:[1]

If you are just trying to search a certain site from the address bar, you do not have to create any OpenSearch XML.

You can add a bookmark with %s as a placeholder, and give it a keyword. The subsequent search terms will fill into the placeholder. For an example that searches Stack Overflow, put these fields into a "New Bookmark"

Name Search Stack Overflow
Location https://stackoverflow.com/search?q=%s
Tags development (your relevant tags)
Keyword so
Description

To perform a search, type so How to exit Vim into the address bar and hit return.

If you have also added search engines in Chrome, you will recognize the same %s placeholder that is used in chrome://settings/searchEngines. I do not know, but it may be that Chrome also uses bookmarks like Firefox under the hood.

Solution 2:[2]

You can also use this opensearch Mycroft Project

It has everything already created just enter the values into textbox and and you have the XML code; and you can install the search engine directly in the browser from there.

You can also submit your website search engine, and search for (and use) a search engine submitted by another user.

Solution 3:[3]

The easiest way to add new search engines is via the "Add to Search Bar" add-on, simply right click on the search form on the webpage you want to add, then "Add to Search Bar" and it will show up in the Search Bar:

Solution 4:[4]

I came here to add tldr-pages as a custom search, looking for a way how to do that.

Turns out, that there was a very simple way: In Firefox, next to the URL-bar, there is a search-bar with a magnifying-glass. If that magnifying-glass has a PLUS on it, the page you are looking at offers its own openSearch.xml-file.

  • hit the search-box
  • a pop-up opens
  • find the line that says "Add" at the bottom and
  • click it

That is how I solved my initial problem and maybe it solves yours, too.

Solution 5:[5]

Make sure that your & is escaped as &
Firefox will NOT activate the search engine that are broken in format
Check https://developer.mozilla.org/en-US/Add-ons/Creating_OpenSearch_plugins_for_Firefox#Troubleshooting_Tips

Just put a right xml file in right place,it will take effect after restarting firefox

Solution 6:[6]

Give this a try.

http://www.investintech.com/resources/blog/archives/5263-address-bar-search-engine.html

Using Iceweasel (Linux), should work for Firefox too. Tried it for about 30 sites that i had with Chrome/Chromium.

Pro:

Works!

Cons:

Too much manual work.

Solution 7:[7]

It helped for me. (Firefox v50)

  1. Close Firefox;
  2. Delete in profile of Firefox: search.json, search.json.mozlz4
  3. Copy your OpenSearch in searchplugins folder;
  4. Add an entry in search-metadata.json;

    "[profile]/your-opensearch.xml": {
      "alias": "your-opensearch",
      "order": 25
    }
    

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 jpaugh
Solution 3 Grumbel
Solution 4 Chris
Solution 5
Solution 6 Moni
Solution 7 jpaugh