Have you been frustrated that your Google search result always include a site which you don’t want.  I hated to waste my time on a particular site which always came up and never seems to have any answer to my problems. Finally, I decided to customise the Google search engine in Firefox.

Following is a template XML description of a Firefox search plugin, text in bold needs to be edited to search engines specification

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>engineName</os:ShortName>
<os:Description>engineDescription</os:Description>
<os:InputEncoding>inputEncoding</os:InputEncoding>
<os:Image width="16" height="16" type="image/x-icon">data:image/x-icon;base64,imageData</os:Image>
<os:Url type="text/html" method="method" template="searchURL">
<os:Param name="param1" value="Value1"/>
...
<os:Param name="paramN" value="ValueN"/>
</os:Url>
<os:Url type="application/x-suggestions+json" template="suggestionURL"/>
<os:SearchForm>searchFormURL</os::SearchForm>
</SearchPlugin>

engineName: A short name for your Firefox search engine. Text cannot contain more than 16 chars and any HTML/markup tags

engineDescription: Text describing the Firefox search engine.  Text cannot contain more than 1024 chars and any HTML/markup tags

inputEncoding: The Encoding to be for data put in to search engine

imageData: URI to an icon for the search engine. Possibly, 16×16 “image/x-icon” or 64×64 “image/jpeg” or “image/png”

Examples:

<Image height=”16″ width=”16″ type=”image/x-icon”>http://example.com/favicon.ico</Image>

or alternatively “the data: URI kitchen” can used to create “data URI scheme

<Image height="16" width="16">data:image/x-icon;base64,AAABAAEAEBAAA ... DAAA=</Image>

URL: specifies URL to seach

method: GET or POST method to retrieve results

searchURL: the base URL for search query

param: parameters to be passed to search query  as key/value pairs

suggestionURL: URL used for suggestion by the search engine

searchFormURL: the URL to go to, to open the search page

Finaly, here is what I came up with

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Rojanu's Google</os:ShortName>
<os:Description>Rojanu's Google Search</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/png;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAA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2F%2F9QU90EAPQAAf8DAP0AAfMAAOUDAtr%2F%2F%2F%2F7%2B%2Fu2bCTIYwDPZgDBWQDSr4P%2F%2Fv%2F%2F%2FP5GRuABAPkAA%2FwBAfkDAPAAAesAAN%2F%2F%2B%2Fz%2F%2F%2F64g1C5VwDMYwK8Yg7y5tz8%2Fv%2FV1PYKDOcAAP0DAf4AAf0AAfYEAOwAAuAAAAD%2F%2FPvi28ymXyChTATRrIb8%2F%2F3v8fk6P8MAAdUCAvoAAP0CAP0AAfYAAO4AAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAA</os:Image>
<os:Url type="application/x-suggestions+json" method="GET" template="http://suggestqueries.google.com/complete/search?output=firefox&amp;client=firefox&amp;hl={moz:locale}&amp;q={searchTerms}+-site:http://www.experts-exchange.com"/>
<os:Url type="text/html" method="GET" template="http://www.google.com/search">
<os:Param name="q" value="{searchTerms}+-site:http://www.experts-exchange.com"/>
<os:Param name="ie" value="utf-8"/>
<os:Param name="oe" value="utf-8"/>
<os:Param name="aq" value="t"/>
<!-- Dynamic parameters -->
<os:Param name="rls" value="{moz:distributionID}:{moz:locale}:{moz:official}"/>
</os:Url>
<Url type="application/opensearchdescription+xml" rel="self" template="http://rojanu.emdesign.co.uk/rojanusgoogle.xml" />
<os:SearchForm>http://www.google.com/firefox</os:SearchForm>
</SearchPlugin>

and lastly, save it as an XML file,
On Windows OS

C:\Program Files\Mozilla Firefox\searchplugins\customgoogle.xml

On Ubuntu

/usr/lib/firefox-addons/searchplugins/en-US/customgoogle.xml

or

$HOME/.mozilla/firefox/{your_profile}/searchplugins/customgoogle.xml

If preferred the search plugin can be provided from a site. Just add following to the head tags of the site and upload the search plug-in file to your site

<link rel="search" type="application/opensearchdescription+xml" href="http://yoursite.com/customgoogle.xml" title="Custom Google">

Hope this will help someone!!!