Custom Google Code

Create a new search engine code

  • If you haven't got your Google Custom Search code, or have lost the original one, go to Google Webmaster Tools
  • and make sure you have registered your site.
  • On the Google Custom Search home page, click New search engine.
  • In the Sites to search section, add the pages you want to include in your search engine.
    You can include any sites you want, not just sites you own. You can include site URLs or page URLs, and you can also get fancy and use URL patterns.
  • The name of your search engine will be automatically generated based on the URLs you select. You can change this name at any time.
  • Select the language of your search engine. This defines the language of the buttons and other design elements of your search engine, but doesn't affect the actual search results.
  • Click Create.
  • To get your code, click "Search engine ID" on the next page. Copy the code and paste it into the "Search Engine ID" box of this extension.

  • Your code can also be found in your existing Custom Code, which will look like one of the examples below.
  • It is only the HIGHLIGHTED code you require for this Extension.
  • NOTE:- The code below is non functional and for example only.

  • < form action="" class="namesearch" >

    < input name="cx" type="hidden" value="8029618600086844417864:d5vpjzyqoo" >

    < input name="ie" type="hidden" value="UTF-8">

    < div class="input-append">

    < input name="q" type="text" class="span2">

    < button type="submit" class="btn">Search < /button >

    < /div >

    < /form >

    < script >

    (function() {

    var cx = '8029618600086844417864:d5vpjzyqoo';

    var gcse = document.createElement('script');

    gcse.type = 'text/javascript';

    gcse.async = true;

    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +

    '//' + cx;

    var s = document.getElementsByTagName('script')[0];

    s.parentNode.insertBefore(gcse, s);

    < /script>
    < gcse:search > < /gcse:search >

    The Custom Google Search Results page in the Screenshot and Demo is the one arrowed below

    Google Verification Code

    In Google Webmaster Tools, go to the verification tab, select Alternate Methods. In the HTML tag select the code bounded by the red box (do not include any " ) and paste in in the Verification area of the extension, Submit the extension then verify in Google Webmaster tools.