Mar 3 2009

Utilizing Google Custom Search

In December, I followed along as 24 Ways published their web geek advent calendar. It was one of the more helpful sets of "tips n' tricks" articles regarding web development and I recommend checking it out if you have not.

One article that was particularly interesting to me was Sitewide Search On A Shoe String by Christian Heilmann. Heilmann essentially explained how to build a sitewide search utilizing Yahoo! BOSS (Build Your Own Search Service). However, I am not a Yahoo! fan and more interested in getting something like this working with Google Search.

The idea was forgotten until I searched for something on Serious Eats, one of the better foodie blogs around. Serious Eats uses the Google Custom Search API and integrates the search results directly into their own page style. Exactly what I was after.

I hope to rework the search functionality on Silent Uproar this year. There are tens of thousands of items posted on Silent Uproar and this type of solution suits the content perfectly. With over 50% of our traffic coming from Google Search, it just makes the most sense; Google clearly has the best search service, so it benefits me to utilize their technology. I realize this isn't the best solution for every website, but it's better than not including search services in a project—especially if you have a lot of static pages.

On a related note, I was reading back through Jeff Atwood's The Importance of Sitemaps from last year. In the post, Atwood discusses how Google drives over 50% of the traffic to Stack Overflow, which parellels Silent Uproar quite well. He then goes on to talk about how sitemaps can help boost that traffic further. Putting two and two together: since Google Custom Search utilizes Google's index to display results, it would seem that creating sitemaps would give Custom Search a leg up. Low and behold, a quick Google search later and we have Sitemaps offer better coverage for your Custom Search Engine from Google's Webmaster Central Blog.

You still have to put the work into implementing Google Custom Search. However, do it once and you can use it over and over. If anything, it makes creating a sitewide search seem a lot less daunting.


Sadly, no one has left a comment.