Google Site Search

Support for website and web template site search

Sticky Note Site Search Setup
Support for templates that include a "search_results.html". If your template includes a "search.js" or search box, see the help.html included with your template download for the correct setup info and support links.

See Instead…

Outdated: Only for pre-2012 templates that include a "search_results.html".
If you have a "search.js" but your template does not include a "search_results.html" see your template "help.html" or check site search options.

Search .js file locations:
The template search .js files you will be editing may be located either in your main template folder with your HTML pages or in your template "extras" folder.

Option #1: Simple Google setup:
For the easiest search setup to search your site, delete or rename the "search.js". Rename the "OPTIONAL-search-SIMPLE.js" to "search.js". Edit the "var searchdomain" in the now renamed "search.js" with your website domain name. Test the form on one of your template pages. Google should now search "your site only" from your template search box.

Note: If you are using foreign language characters during your site searches and are having any problems, try editing the "UTF-8" in 2 places to "ISO-8859-1" in the "search.js".

Option #2: Integrated Google search (Custom Search Engine):
This is the default option setup in the template in your download. This can be involved to setup but will use your template logo header and footer in the search results.
  1. Create a Google account if you do not have one.
  2. Create a search engine (login to your account.)
  3. Follow the directions at Google to "Create a Custom Search Engine" and click "Next".
  4. Enter your search engine name and "sites to search", agree to the terms and click next.
  5. Choose your style and click next.
  6. You will now be on the "3. Get the Code" screen. Select the text link "Look and feel page" above or below the code box.
  7. Select to highlight the "Two page", choose "Save & get code".
  8. In the "Specify the url in your site where you want the search results to appear:" enter your full URL: "".
  9. Copy and paste the code from the two boxes, "Search box code" and "Search results code", and create and paste it into a blank text document on your computer. This text file is to be used for setting up your site search. Save this text file.
  10. From your saved text file, copy all the code generated in the "Search Result" code box. Open the template "search_results.html" in a plain text editor. Find the "search results" code in the page and paste your results code over this code. Be sure to upload this HTML page when you upload your website.
  11. You will now edit the template "search.js" in 2 or 3 places; with your domain name, a new "id", and your Google "CustomSearchControl" or "cx" number from the "Search box code" that you just created in your Google account.

    Replace the "" in the variable "var yourdomain" with your domain information:

    var yourdomain =

    Optionally replace the "id" code (not required):


    ...with this code:


    (The above edit may not be required in 2011 and later template models)

    Replace the existing name="cx" value...

    name="cx" value="003488088439636726711:dzunaemraqw"

    Replace the above "cx" value with the new code you have generated at Google known as the "CustomSearchControl" number. This is a sample of the code you will copy into the "search.js":

    var customSearchControl = new'003488088439636726711:uey5kgzpqs4');

    View Example

Notes: If custom "Look and Feel", or other options, are not selected during initial search setup, it can be selected and added later. Login to your Google account and select "My Saved Searches". Select the "control panel" for the applicable search, then select "Look and Feel" from the left-hand menu links. Follow steps as outlined above.

Trouble-shooting: Integrated Google setup:
If you have done the steps above and the integrated Google search is not working, try the following:
  1. Make a copy of any HTML template page. The "missing.html" or "thanks.htm" is a good page to copy for this. Name it "search.htm".
  2. Add your generated search code to this page exactly as Google instructs. Do not add this to the "search.js" file, paste the code right into the HTML page.
  3. Create a results page exactly as Google indicates with a copy of a template page. Use the name for this page that Google suggests. Add your results code from your Google account to this page.
  4. Open the "search.htm" and test to see if your test search works.

    • Save the 2 pages you created.
    • Compare the code in the "search.js" to the code in the "search.htm" you created.
    • Compare the results code in the test "search.htm" and the template "search_results.html" pages.
    • If you can not find the problem you can contact Allwebco support and we will look at all your files. We will need your working test pages uploaded to your hosting area to check them.

    • Check and see if your site is listed at Google.
    • Check and see if all your pages are listed in Google. You can check this under the advanced search at Google and "Search within a site or domain" option.
    • If your site is not listed with Google you may need to wait a few days for it to be listed and for the search to work.
    • Try searching for text that is included on your homepage.
    • Make sure you have used all new generated code from your Google account.
    • Check with Google site search support to see if you can locate the problem.

Option #3: Burgdorf's WebSearch:
An "OPTIONAL-Burgdorf-search.js" will be included with your template download. For a custom non-Google, no ads website search see Burgdorf's WebSearch setup.