Adding a search engine to your website helps users discover content easily. It is also useful for SEO purposes and understanding user intent on your website. With Google setting the standards, the thought of coding a search engine can be overwhelming for even experienced programmers.
Custom search engines are easier to create than you would think. Coding it from scratch is an expensive process, but that doesn’t mean that it is the only way to add a search to a website! Building a custom search used to be an enterprise market but in the last decade, things have changed, and search as a service has taken over making it much cheaper and easier to build your own search engine. Here are detailed steps to add search to your website –
Add search to Website using ExpertRec custom search engine: (No ads)
ExpertRec is a search engine provider that will build a search engine for you from just your website’s URL. You can then make changes to this search engine without coding from the ExpertRec dashboard. Building the search is automated and takes only a few minutes and you can try out this service for free.
Create a Search Engine
- Go to https://cse.expertrec.com/?platform=cse and login with your Gmail account
- Enter the URL of the website you want to crawl and choose your nearest data center region. You can, optionally, enter your sitemap URL as well. Sitemaps make it easier for the crawler to discover all the pages on your website, but it is totally optional
- Crawl/indexing of your pages will start. This means that the search is getting built and you don’t need to do anything. You can still customize the UI while the crawl runs.
- Once the crawl is complete, you can check a demo and see if the search functions to your liking. You can tweak the ranking or change the appearance of the search and see the effects on the demo before installing the search on your site. Yes, it supports multiple languages.
Add the Search to Your Website
- Installing the search on your website is easy. You have to add a JS snippet to all pages on which you want the search to work. The JS is what drives the search, the engine behind it. For adding the search box, follow the next step.
- You can choose to keep the existing search box on your page or add the <ci-search> tag on the pages where you want the search box to appear. You can also use the CSS Selector method if you already have a search box on your site. This will attach ExpertRec’s search to your existing search box.
- You can use the control panel to tweak the features of your search.
- Once you add the code to your site, the search goes live.
- The default UI is the overlay UI where the search results pop up on the same page. Some customers want search results on a different page. For search results to come on a new page, go to UI Customization->search layout->choose “search layout on different page”. In the ‘additional info’ section, add the search result path where you want search results to come on pressing enter and the query parameter. After this, you have to get the new code and add it to your site to get the new search interface.
- In the below example, the search result path is: ”/search-results/” and q is the “query parameter” if your search results have the URL format ‘http://providerconnection.davisvision.com/search-results/?q=lense’
- A lot of our customers moving from Google site search require the ability to change the appearance of the search bar. This can be done easily from the dashboard. Go to UI Customization->look and feel. Here you can make adjustments to the search box. You can edit the height, margin, padding, font size, etc. You can also add custom CSS, your own font awesome icon for the search box, and much more
- In some situations, you might want to crawl more than one URL to show in search results. Go to Crawl->what to crawl->URLs->enter the URLs you want to crawl ->press update.
- By default, images are picked up by ExpertRec’s Google site search replacement. To pick up custom images, go to Crawl->Advanced->Manual Extraction->enter the CSS selector and attribute name->click update (This is an advanced setting and is not necessary for most users)
- Sometimes you might want to crawl pages that are behind a login page. This can be done from the dashboard as well. Various types of authentication are supported and you can read more about it here.
- Filter URLs you don’t want to show up in search results- Go to Crawl ->What to Crawl->Filter URLs-> enter the URLs you don’t want to come in search results->Update.
- Our crawler by default indexes URLs that have GET parameters. You can use filters to remove these URLs as well.
ExpertRec comes with a ton of customization options. If you get stuck somewhere, our support team is always available on chat or you can raise a support ticket.