Skip to content


Google custom search tips

February 19, 2012

Google custom search is a very easy way to get a search box on your page.  There are a few things you should be aware of however.

  • Set a good title.  The title is the first thing the user sees for each result.  A list of results with the same title isn’t going to help anyone.
  • Remove pages you don’t want indexed.  One of the easiest ways to do this is via the robots.txt file.
  • Tell Google which bits of the page you don’t want to get summarized in the snippets.  You can do this by adding some special comments: <!– googleoff: snippet –> to tell google you don’t want the following HTML to be included and <!– googleon: snippet –> to switch the normal behaviour back on again.

There are also other switches for turning indexing off and on as well as specifying which links should be followed.  The three points above however should get you decent enough looking search results without having to do too much screwing around.

From → Technical

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: