Joomla Tutorials and Blog Posts

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

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.

Download

tutuploadstutuploadsmedia_1300927421098.png

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.

Install

tutuploadstutuploadsmedia_1300927568232.png

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

Set Up Custom Search Engine in Google

tutuploadstutuploadsmedia_1300928179019.png
tutuploadstutuploadsmedia_1300928492465.png

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 www.ostraining.com and www.joomlatraining.com show up in the search.

Formatting your URLs

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

Click Next when finished.

tutuploadstutuploadsmedia_1300929074983.png

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 www.ostraining.com and www.joomlatraining.com, 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

tutuploadstutuploadsmedia_1300929663910.png

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.

tutuploadstutuploadsmedia_1300929781979.png

Copy the unique ID.

Configure Joomla Component

tutuploadstutuploadsmedia_1300927955312.png

Go to Components >> googleSearch (CSE)

tutuploadstutuploadsmedia_1300929910683.png

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

The custom the rest according to your preferences.

 

tutuploadstutuploadsmedia_1300930006628.png

Save.

Create the Menu Item

tutuploadstutuploadsmedia_1300930183904.png

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

tutuploadstutuploadsmedia_1300930401211.png

Click on New.

tutuploadstutuploadsmedia_1300930492204.png

Click on googleSearch (CSE)

tutuploadstutuploadsmedia_1300930594451.png

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

Test

tutuploadstutuploadsmedia_1300931293159.png

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

Comments

 
Aaron
#1 Aaron 2011-10-15 02:17

This doesnt works on J1.7, so I think it doesnt with J1.6, another suggestion for 1.7?
 
 
Nick
#2 Nick 2011-10-15 22:05

Hi Aaron,

That's correct it's for Joomla 1.5. You can try JMGoogleSearch instead which is 1.6 native so it should work in 1.7 as well:
extensions.joomla.org/.../...

Kind regards,
Nick
 
 
Sea
#3 Sea 2012-09-01 15:30

Hi,
I installed and it seemed to work, but when I went to input my ID, it was not in my Components. In time, I found it listed in plug-ins, but nowhere else.

Thinking something went wrong, I tried to uninstall, but I got an error, though it was no longer in plug-ins.

Any thoughts on how I might clean this up and potentially get it to work?

thank you,
Sea
 
 
wladimir
#4 wladimir 2013-02-02 10:31

Its possible use it with a Joomla Module (2.5.8)? Regards
 

Add comment


Security code
Refresh

blog-ad

Start Online Training

Members get access to all our video training. That's 1,142 training sessions in Joomla, Drupal, WordPress and Coding.

Manage All Your Joomla Sites

adminicredible

With Admincredible you can update and manage all your Joomla sites. If you have 5 or 500 sites, Admincredible will make your life easier! Visit Admincredible.com.

Latest Comments

The License for Our Tutorials

All of our tutorials are published under the Creative Commons Attribution-NonCommercial license. This means:

  • You can re-use these tutorials.
  • You can modify these tutorials.
  • You must link back to our original tutorial.
  • You can't use these tutorials commercially.

Click here to read the full license.

Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.

Copyright 2013 Open Source Training, LLC. All rights reserved.