How to Create a Google Custom Search Engine in a Joomla Site

| Joomla

This tutorial will show you step by step how to create a Google custom search engine for your Joomla site (and/or another site) in your Joomla site. This tutorial uses Joomla 1.5 but you can use exactly the same steps on Joomla 1.6.



We are going to be using an excellent Joomla extension called googleSearch (CSE) component . Click here to go directly to the download page.

Download the extension of your respective Joomla version.



Go to Extensions >> Install/Uninstall >> Browse... >> Upload File & Install

Set Up Custom Search Engine in Google


The first step (1. Setup up your search engine) is self-explanatory. Configure appropriately.

The only tricky part is the syntax for the "Sites to search". In the example, I have it so that only results from and show up in the search.

Formatting your URLs

  • Individual pages: Specifying will just include the mypage.html page on
  • Entire sites: Specifying* will include all the pages on
  • Parts of sites: You can use wildcard patterns to include just certain parts of a site. For example,*about* will include only files on that have about in their name.
  • Entire domains: You can also specify an entire domain using * If you specify, we will automatically convert this to **. If this is not what you want, you can change it back in the control panel.

Click Next when finished.


In the second step (2. Try it out) we only have to test the search engine to see if we correctly configured the URLs in step 1. There is no need to customize because we will do that in the Joomla administrator.

In the example screenshot above, I tested with the keywords "Joomla Training". The results only bring up results from and, which is what I wanted.

Test the search. If the results are not what you wanted, go back to step 1.

Click Next when finished.

Get the Custom Search Engine's unique identifier


The last thing we need is the Custom Search Engine's unique identifier. The easiest and less confusing approach for most people is to copy it from the control panel. Click here to go to the management area. Click on Control Panel.


Copy the unique ID.

Configure Joomla Component


Go to Components >> googleSearch (CSE)


Paste the ID in the Custom Search Engine's unique identifier field.

The custom the rest according to your preferences.




Create the Menu Item


Finally we need to create the menu item. Go to Menus >> Your menu


Click on New.


Click on googleSearch (CSE)


Configure appropriately. Give it at least a Title and then Save.



Go to the menu item in the front end and test your search.

About the author

Nick is the Director of Support at OSTraining and you can find him in almost every area of the site, from answering support requests and account questions to creating tutorials and software.