Add Custom Search to your site

Once you've created your custom search engine, you can add the Custom Search element to your site so that visitors can use it. To do this, you'll need to copy some code and paste it into your site's HTML where you want your search engine to appear.

Add a custom search engine to your site

  1. From the control panel, select the search engine you want to edit. 
  2. If you aren't already on the Basics tab, click Setup from the left menu and then click Basics.
  3. Click Get code.
  4. Copy the code and paste it into your page's HTML source code where you want the Custom Search element to appear. If you've chosen the two column or two page layout option, you'll need to copy and paste two snippets of code:
    1. Paste the first code snippet where you want the search box to appear.
    2. Paste the second code snippet where you want the search results to appear.
  5. Save, and you're done.

Mobile site code for Google Site Search

If you have a Google Site Search account with no associated AdSense account, you can use the mobile version of the code for your site. Mobile code should only be used on sites that will not also be accessed from a desktop.

Note: Mobile code doesn't support Custom Search v1.

Add mobile code to your mobile site

  1. From the control panel, select the search engine you want to edit. 
  2. If you aren't already on the Basics tab, click Setup from the left menu and then click Basics.
  3. Click Get code.
  4. Click on the Mobile tab. 
  5. Copy the code and paste it into your mobile site's HTML where you want the search element to appear.