Make your website searchable
It does not take long before a website becomes big enough that visitors have trouble finding what they want. If they can't find it, they often move on, resulting in your loss. Something you want to avoid.
A great way to resolve this is to add a search box into your website. This way visitors can quickly find out if you have the information they are looking for.
Some Website Builders and Content Management Systems (CMS) have options to add a search box, but in many cases it requires in-depth knowledge of website development and databases to implement a system that works well.
Contents
This is where Google's Custom Search comes in. It's relatively simple to embed into a website and brings with it Google's own powerful search algorithms. No need to learn about databases and advanced SQL commands here!
There are some caveats though. You are dependent on how well Google has indexed your website. This can mean search results may miss out some pages or be based on old content. Also, Google includes adverts in the search results, which can cause visitors to leave your website. On the plus side, you can make a little money from those adverts!
The rest of this article will take you through the basic steps to embed Google Custom Search into your website:
Sign in to Google
Before you can create a Google Custom Search you need to have a Google Account. You may already have one for Gmail, Google+ or another one of Google's services.
If you have an AdSense account then it would be best to use that. You can then associate your Google Custom Search with your AdSense account to get paid from the adverts in the search results.
If you don't have an account yet, you can create a new one here:
https://www.google.com/accounts/NewAccountIt's quite a simple form. All your really need is an email address. Don't forget to note down the email address and password you used!
Create your Custom Search Engine
Once you have signed into your Google Account you can start to create a Custom Search Engine by going to the Google Custom Search page.
Just click on the New Search Engine... link to get started.
Fill in details requested. In particular the sites you want it to search through. Then click Next.
Here you need to chose a Style. Don't worry to much now, as you can always change it later. If you are CSS savvy you can customise it as well. Click on a Style to see a preview of it, which you can actually test to see if what sort of results Google will display. Once you have chosen your theme then click Next.
The Search Code
By default Google provides code that you can use to add to a dedicated search page. This is the simplest option. With this you create a new page on your website and add the provided code into it. You can then add "search" links to it from the other pages of your website, and your done. Visitors have to go to the search page (via those links) in order to perform a search.
If you wish to have a more integrate search where search boxes are embedded on every page, then click on the Look and feel link near the top...
Embedded Search Boxes (look and feel)
There are several Look and feel Layout options that you can use to change the way the Google Search Engine works. The default is Full-width which lets you display the search results on the same page as the search box.
My favourite is the Two page option, which is what is used on this website (see top right). This option lets you embed a search box on every page. When a visitor searches using it they are sent to a dedicated search page to see the results.
It even suggests refinements to your search as you type.
To use the Two page option, go to the Look and feel section and select Two page as your layout. Then click the Save & Get Code... button. Here you will need to enter the URL of the page you are going to use to display the search results. Create that search result page and embed the provided Search results code into it. Finally add the Search Box Code to all the pages on your website (a good place would be in a common header if your website is template driven).
Extra Options
There are many other options available from the sections listed on the left hand side. I will highlight some of the more useful ones:
Preview searches
The Preview option lets you try out the custom search to see if it meets your requirements
Do you have an XML SiteMap?
If you do. first verify it with the Google Search Console (Google Webmaster Tools) , then add it to your Custom Search via the Indexing option.
Want to make money?
If you wan't to get some pocket money from the adverts Google shows in the search results then you can set this up in the Make money section. It requires you to have a Google AdSense account.
Improving the results
Google often uses your pages titles and description to explain your pages in these results, so what they say is important in helping the searcher make a decision. I've written some articles to help you edit and improve both your Title Tag and your Meta Description.