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?
-
2See related question at SuperUser which is not closed: https://superuser.com/questions/7327/how-to-add-a-custom-search-engine-to-firefox – wisbucky Sep 24 '19 at 20:51
8 Answers
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:"
Field | Value |
---|---|
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.

- 8,362
- 6
- 61
- 88
-
This works great (no restarting required) and *could* (should...) be cross-browser! – RJVB Nov 05 '18 at 10:21
Here are the steps:
Create an OpenSearch XML file containing information about your search engine like
ShortName
,Description
,URL
, etc.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
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.

- 8,362
- 6
- 61
- 88

- 1,134
- 2
- 13
- 29
-
3My experience was that step 3) was not necessary, but what *was* necessary to have the new xml file recognized was to delete search.json and search.sqlite in %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default – Nathan Stretch Aug 12 '13 at 05:27
-
1Firefox 30.0 (Ubuntu) -- I didn't have to do step 3 either. I also didn't need to delete search.json and I saw no search.sqlite. – Lambart Jul 11 '14 at 18:20
-
somehow this works great on my work computer but not on my personal PC :( – phuclv Apr 10 '16 at 13:48
-
2This only works up to FF 45. Here's an [alternative way to do it](https://bugzilla.mozilla.org/show_bug.cgi?id=1236498#c7) (which works even if the searchplugins folder does not exist); however, it does **not** work for FF Quantum. – jpaugh Jan 30 '18 at 16:23
-
1@jpaugh Here is a solution that works with Firefox 78 (on Linux at least): https://superuser.com/questions/7327/how-to-add-a-custom-search-engine-to-firefox/1566328#1566328 – baptx Jul 05 '20 at 20:53
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.

- 6,634
- 4
- 38
- 90

- 1,217
- 14
- 22
-
4When trying to add a plugin from that site to Firefox, I get a popup saying "Your browser does not support OpenSearch search plugins", which is clearly not true (and the site itself says Firefox does). Even if it worked, I have to say: that is one awful web site. – Lambart Jul 11 '14 at 18:17
-
This still works with FF Quantum! You can search existing entries (submitted by other users) [here](http://mycroftproject.com/search-engines.html). – jpaugh Jan 30 '18 at 16:45
-
1This is amazing. They claim to have 23k websites. Best part: it worked in just a few clicks. – Peeyush Kushwaha Dec 24 '18 at 14:29
-
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:

- 6,585
- 6
- 39
- 50
-
4This addon is unfortunately no longer supported (FF 57). Great one otherwise. – johndodo Jan 19 '18 at 09:50
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

- 69
- 4
-
3
-
1This seems more like a comment than an answer. If the question weren't already closed, I'd flag it. – jpaugh Jul 06 '20 at 15:16
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.

- 5,788
- 4
- 29
- 40
-
1FWIW, OpenSearch works by providing an XML file in [this format](https://developer.mozilla.org/en-US/docs/Web/OpenSearch), and linking it with `rel="search"`. For example, on tldr-pages, we see: ``, which adds [this file](https://tldr.ostera.io/opensearch.xml). – jpaugh Jan 30 '18 at 16:05
-
BTW, I got this to work in Ubuntu (Linux), but not Windows. Not sure what's going on, but it might be one of those custom modifications that Canonical makes to Firefox for Ubuntu. – jpaugh Jan 30 '18 at 16:12
-
-
@Finch_Powers Thanks! Though, I didn't really answer the OP's question, but simply explained Chris' answer in more depth. – jpaugh Feb 08 '18 at 20:17
-
Nice way to get the official search formula added automagically, but it would be even nicer if the add option could be accessed without showing the dedicated search widget (which takes up unnecessary place). But maybe it's possible and I overlooked it? – RJVB Nov 05 '18 at 10:24
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.

- 73
- 2
- 8
This helped for me on Firefox v50:
Close Firefox.
Delete in profile of Firefox:
search.json
,search.json.mozlz4
Copy your OpenSearch from the
searchplugins
folder.Add an entry in
search-metadata.json
:"[profile]/your-opensearch.xml": { "alias": "your-opensearch", "order": 25 }
-
This did not work for me with Firefox 78 but I found another solution: https://superuser.com/questions/7327/how-to-add-a-custom-search-engine-to-firefox/1566328#1566328 – baptx Jul 05 '20 at 20:51