How to Add a Search Engine With Google Custom Search
There are two ways to add a search engine to your site:
1) Outsource a pre-created script
2) Install your own script
Just like anything else, there are advantages and disadvantages to both methods.
Outsourcing a Search Engine
If you outsource a search script, you don't have to worry about installation or configuration.
Usually you just paste a few lines of code into your site and the site that hosts your search function may allow you to customize the search result page.
The downside to outsourcing is that you don't have complete control of how the search function works and how it is displayed on your site. You also may have to put up with advertising on the results page.
How to Create a Google Custom Search Engine
If you're a visual person, you can watch the video below where I show you how to set the search engine up. If you'd rather follow text, instructions are below the video.
First go to the GCS site. Now select New Search Engine.
Fill in all the details about your search engine in the forms provided and choose which edition of the search engine you want to use. (Standard or Site Search).
Select the style of search engine you want.
If you choose a custom style, you can select the look and feel you want so it matches the theme of your website.
Be sure to click the various tabs so you can set design defaults for all parts of the search engine (results pages, ads, etc.).
Now click Next.
Grab the code that you will paste on the page where your search results will show.
Now you may be wondering about the search box. For whatever reason GCS defaults to the results-only format.
In order to get the code for the actual search box, you need to click the basics link below the code and select the "Look and Feel" link on the left side of the page.
Now select the Two Page style where the search box will appear on one page and the results will appear on another.
This will allow you to get the code for the search box and the code for the results page.
Creating a Results Page
Before you can use GCS, you need to create a page for the results.
If you're using WordPress, you can create a new Page. There are complete instructions for how to do this in the video above, so it will probably be easier to watch the visual due to all the steps involved.
If you do not use WordPress and have a static HTML site, you would just create a blank template page for your site and paste the results code in the place where you want the results to appear.
Inserting the Code Into Your Site
Once you have the code you need, place them in the appropriate sections of your site.
Most WordPress themes allow you to edit the <head> section of your site in the main Main Settings area of your theme. The Genesis themes definitely do. If you don't do this, your search box may not work.
Be sure you follow the instructions carefully so your search engine will work properly.
If the above option seems to complicated, you can also setup your search engine directly through Google AdSense (if you are a member).
When you're logged into your account, go to My Ads >> and select New custom search engine.
Monetize Your Engine With Google Ads
If you are a member of AdSense, you will earn money if your visitors click on the ads that display alongside your search results.
In the video above I show you how to sync your account with AdSense. Or if you use Ileane's method above, your account will already be synced when you create your engine.
Installing Your Own Search Engine Script
If you do a Google search for "search engine script", you can find tons of sites that offer free search engine scripts.
Most of them are written in Perl/CGI or ASP so they do require you to know a bit about configuring scripts and uploading files.
Even though the search engine script is already written you still need to install it on your web server. This may require you to get some information from your web host because the scripts usually ask you to input certain information regarding your host.
If you have a basic understanding of installing scripts then you shouldn't have a problem. However, if this intimidates you I'd recommend outsourcing a search function like I did.
The other downside to installing your own script is they can take up a lot of system resources. In my opinion, it's just easier to use Google Custom Search.
For a listing of search engine scripts go to
If you liked this, please share. Thanks!