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.
Visit the Google website listed in Resources. This is where you will build a custom search engine (CSE).
Click "Create a Custom Search Engine."
Enter your User ID and password to log on to your Google account.
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.
Enter the URL of your website in the "Sites to search" text box.
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.
Click "Next." Copy the HTML code that you see in the text box.
Open your HTML page using Notepad or an HTML editor.
Paste the code in thesection of the document where you want your search bar to appear.
Save the document and open it in your browser. Type a search query, and Google will return results from your website.
Tips & Warnings
- You cannot use Google in the name of your custom search engine. Google also suggests not using trademarked names without permission.