Search code examples
firefox

Adding A Custom Search Engine To Firefox


I need to add a custom search engine to Firefox. I have a name and a search URL. How do I add those to the available search providers?


Solution

  • Here are the steps:

    1. Create an OpenSearch XML file containing information about your search engine like ShortName, Description, URL, etc.

    2. Give a name to that XML file and put it in one of these folders:

      • Available just to you

        %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\searchplugins
        
      • Available to anyone on the computer

        %PROGRAM_FILES%\Mozilla Firefox\searchplugins
        
    3. Modify Firefox's preferences file at %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\prefs.js. Simply add/modify this line:

      user_pref("browser.search.selectedEngine", "engine_name");
      

    There is no need to modify a sqlite database file manually. The new search engine will be added automatically after restarting Firefox.