Search functionality is the quickest and easiest way to find information on a website. While some websites provide a search bar for this purpose, others still don’t have it making a bad user experience. This article deals with two things:
- How to do a google search within site: This is about google search specific sites only using Google’s advanced search
- How to add a google search bar inside a website: This will add a search bar inside your website which users can use to discover content
Use Google advanced search to restrict the search to a specific site
Google’s advanced search is great. It lets you limit the results to just one site by adding site:example.com to the query.
As shown in the picture above, the query site:expertrec.com google search website returns the results for ‘google search website’ but limits it to just the specified domain. This will also extend the search to all subdomains by default.
Add a google search box to your website
This is another way of achieving the goal of searching within a website. But this is targeted more towards the users of a website than the owner. Here we will visit the steps required to add the ExpertRec Custom search engine to your website. This is one of the easiest setup processes of all the available options out there and is highly recommended.
- Navigate to https://cse.expertrec.com/newuser?platform=cse and signup with your Google ID.
- Enter your website’s URL when prompted. You can select a server location near you and add the URL of your sitemap if you wish to. These will be auto-detected otherwise.
- You can play around with the settings and customize the UI as the crawl runs. Once it is complete, you can check out a fully functional demo before taking the search to your website.
- You can take the search to your website with little to no effort. All you need to do is to paste the code snippet available on the dashboard on your website.
ExpertRec comes with more customization options that you can explore. You can read this article to find a more detailed guide on the installation and configuration.