Google Search Script
Google search script for sites is an easy and effective way to add search capabilities to your site. The only issue is that google search has ads and for an ad-free search, experience, click here.
Create your own search script using Google :
- visit google custom search: https://cse.google.com/cse/
- Sign in to Custom Search Engine using your Google Account
- After sign in, go to “https://cse.google.com/cse/create/new” to create a new search engine.
- In the site to search input box, mention your site ( ex. https://www.expertrec.com). Also, you can mention a particular URL path, so that all URLs under that path will only be searched, ex. www.expertrec.com/blog. You can also use the regex pattern for the URLs to be searched. If you need all the subdomains to be searched, you can mention it. ex. *.expertrec.com which will cover all subdomains for searching. By default, the name of the search engine will be the domain name, which can be changed under the “Name of the search engine” input box. Click on “create”, so that a custom search engine for all the URLs mentioned will be created instantly.
- As shown above, the Below options are shown:
- View it on the web: This is a public URL, upon opening, will show the search demo built on top of the Google search index.
- Modify your search engine: This is for modifying search settings. “View it on the web” link will show the demo of the search as a preview. If you modify any settings, you can visit this URL and get a search demo quickly.
- “Modify your search engine” consists of various settings such as search layout, themes, search box customization, and thumbnail(image), promotions, refinements, autocomplete, etc.
Adding Google Search Script:
Once you have done changes, save settings and get the code in the “look and feel” settings tab by clicking on “save & get code”. You can see where to put this code inside HTML page, by clicking “See HTML Example” button. Generally, this piece of code is kept where the search box needs to be shown to users. Note that, search on your site is powered by this simple piece of code. So on your preproduction site, you can see this integration and roll out to production very easily. And search using google search script should be live on your site.
Advantages of Google search script:
- Get results for Web, Images, Videos, News, Files, and Weather
- Easy to setup
Disadvantages of Google search script:
- Google will show ads in the search results. So sometimes customers may see ads of your competitors on your site itself.
- Gets difficult to manage look-and-feel as per your website theme
If you are looking for an ad-free google search script alternative, you can sign up with ExpertRec search script.
ExpertRec Search Script:
- head on to https://cse.expertrec.com?platform=cse
- Enter your site URL
- Add Sitemap URL ( if present)
- Get the Expertrec Search Script code and add it to your site
User Interface for this integration is highly customizable and can be modified to match your site theme easily. ExpertRec Custom Search code explains more on this.
Google Search Script is a powerful script to create your own search engine based on Google. With this script, you can instantly get results for Web, Images, Videos, News, Files, and Weather. But Google will show ads in the search results. As an easy alternative, you can try Expertrec Site Search.