How to Embed the Google Search Bar

To remain competitive, your website needs to not only attract visitors, but keep them there as well. One way to do that is to give site visitors the ability to search the contents of your website. You may not be able to build a search engine that competes with Google’s, but Google will let you use its search technology for free. Simply visit its site, create a search engine that searches your site and embed it in your HTML pages.

...
Add a Google search bar to your website in minutes.

Step

Visit the Google website listed in Resources. This is where you will build a custom search engine (CSE).

Step

Click "Create a Custom Search Engine."

Step

Enter your User ID and password to log on to your Google account.

Step

Enter a name for your search engine and a description. The description is optional, but it will assist you in identifying the search engine in the future.

Step

Enter the URL of your website in the "Sites to search" text box.

Step

Put a check mark next to "I have read and agree to the Terms of Service." Click "Next." You will see a list of search engine styles that include "Green Sky," "Shiny" and "Minimalist." Click one of the styles to select it.

Step

Click "Next." Copy the HTML code that you see in the text box.

Step

Open your HTML page using Notepad or an HTML editor.

Step

Paste the code in the

section of the document where you want your search bar to appear.

Step

Save the document and open it in your browser. Type a search query, and Google will return results from your website.