Skip to content

Google Programmable Search Engine (GPSE): Locally Hosted Search

1. Create a local page in your site to host the search results

We recommend creating either a page or a directory+index page in your website's root directory named "search".  You can choose to host either a campus wide search or a site search on your webpage.

 

2a. Locally hosted Campus Search

This option searches for content campus-wide, i.e. content on any utah.edu domain (as opposed to searching just your site or a specific collection of sites), and displays search results on a locally hosted page within your website.

Copy the following code, and paste it in your page's <body> section, where you want the search results to render.

<script async="async" src="https://cse.google.com/cse.js?cx=008932147021757332745:56t7vy9cw9w">
</script>
<div class="gcse-search"></div>
Example Campus Search

 

2b. Locally hosted Site Search

Request a site search for your website

You will need to contact the GPSE administrators in order to request a site search.  The GPSE site administrators have a registered non-profit account with Google which will allow you to exclude ads from displaying in your search results.   If you choose to create your own GPSE account, your search results will contain ads.

To request code for your site, please send an email to search-admins@lists.utah.edu.  Include the following information:

  • Your contact info
  • List of URLs you want searched

 After your site search is configured, you will be sent a snippet of code similar to the code listed in "2a" to add to your search page.

Example Site Search
Last Updated: 9/24/25