As google site search has been discontinued adding a google search to a website has become a common query. Then again, the query can mean a couple of things. Here are the things that this article will address.
- Add a search box to a website: This will add a google-like search box to your website which will search and display results within that website to the users.
- Use google and search only one website: This method takes advantage of google’s advanced search and limits the search to one domain.
Add a Google search box to a website
Adding a search box to a website can quickly get tricky if not done right. Developing a search engine from scratch is never a good idea keeping in mind the cost and quality. Google’s own solution to this was GSS which got shut down and replaced by Google Custom Search. The problem with it is that GCS is supported by ads and the pricing plans are not very clear.
This takes out GCS as an option for many. You definitely don’t want to show ads of your competitors on your website! As an alternative, I recommend using ExpertRec. It is much easier to set up, has no ads, and gives you full control over the search ranking all without writing a single line of code! Here’s how you can install ExpertRec search engine on your website.
- 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 while 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. This is the easiest method for a google search website.
Use Google’s Advanced Search to limit the search to a website
This is another use case that can come up. Using this method you can restrict a Google search to a single domain.
To restrict a Google search to a single domain, add the site:example.com along with the query. For example, if you wanted to search for google search website but limit the results to expertrec.com, then use this search:
site:expertrec.com google search website