18249
How-to 7 min read September 18, 2019

How to build an internal search on your website

Users visit your website to find certain content. You must add a search feature to the website if you want to have easy access to all materials on your resource. You can implement it using ready-made software solutions.

Using the advanced website search

Most content management systems (CMS) support built-in search solutions, but they don't always have all the necessary features. Therefore, many website owners prefer to add a "live search" to the website with drop-down tips, with which users immediately see relevant results according to their request:
Advanced internal search on the site
You can also implement the search feature involving additional filters of category, size, color, model and other parameters:
Search by products and categories in online store
Website search can be analyzed through Google Analytics and apply this data to improve SEO. Thanks to data analysis, you can find out what users find/cannot find and build landing pages, change navigation, rename categories, etc.

To enable crawling on the website search, you need to find out which parameter is used for this function. You can see it in the URL bar when searching on the website. For example, the /search/? Search = "user query" or search.php? S= "search query" option may be used:
Search parameters in URL address
Then, go to the "Admin" section in Google Analytics and select the desired view. In the settings, enable site search tracking:
Site search tracking in Google Analytics
Next, add the query parameters and, if necessary, the category parameters used on the website:
Query and caterogy paramaters for internal search in Google Analytics
The category parameter can also be found in the URL bar while using the advanced search within a specific category. After entering the parameters, click "Save".

You can view the search queries of visitors in the "Behavior" section - "Site search":
Site search overview in Google Analytics

How to add a Google search to a website

You can add a Google search to the website. First of all, you need to get the search engine identifier:
Custom search in Google Search Console
This method can be used to add Google search to any websites, regardless of the CMS.

Fill in the fields, indicating the domain name, the language and the name of the search engine. Then, click "Create":
How to create custom search Google
Then you need to copy the generated code to the website:


Custom search code for a site

How to build-in search feature on the website using modules

You can add an advanced search using the corresponding modules for your CMS. Let's have a look at examples of free extensions that you can quickly install on your website.

Ajax live search for OpenCart websites

[Free] Ajax live search is a free plugin for online stores running on OpenCart.
Ajax live search plugin for OpenCart
The module is compatible with OpenCart versions 2-3; it supports multiple languages, easy to install and setup without changing the source code of the resource.

To install the module, download the archive for the appropriate OpenCart version:
Ajax live search downloading
In the downloaded archive, change the extension: .zip to .xml:
Changing file extension for OpenCart module
Next, download this file through the admin panel of the website. Go to the "Extensions Installer" and click "Download".
OpenCart extension installer
After installing or removing OpenCart modules, you must update the cache modifiers. Otherwise, the changes won't be displayed on the site. Go to the "Extension Modifications" section and click "Update":
OpenCart modifications manager
Next, go to "Extensions", install the "Ajax Live Search" module and proceed setting it up:
Installation Ajax live search module for OpenCart
Here you can configure the module according to your own preferences. Next, change the status of the module by selecting "Enabled".

The module is installed correctly; the website now has built-in advanced search.

Google Search for WordPress websites

In WordPress extensions store you can find different search plugins. Let's consider installing the WP Google Search plugin, which allows you to add a Google search form to your website:
WP Google Search Plugin
This plugin will allow you to accurately tune the style of the search box, add autosuggestion, use statistics logs of site visitors' requests.

Go to the "Plugins" section and click "Add New". Next, find the plugin by name and click "Install":
How to install WP Google Search
Once installed, click "Activate". After that, you need to configure the search by going to the new "WP Google Search" section:
WP Google Search plugin activation
You will need to configure Google search for the correct plugin performance, as described previously in paragraph 2.

After that, go back to the WordPress admin panel, click "Appearance" and select "Theme editor".
WordPress theme editor in admin panel
Then you need to edit and update the page.php template by pasting the copied code to the right place:
page.php code editing in WordPress
The last step is to get back to the Google Custom Search settings and copy the search engine identifier:
Google search engine identifier
We'll add this code to the website admin panel:
WP Google Search plugin setup
Once finished, all website pages except the main page will have Google search:
Internal Google search for WordPress
After testing the search feature, we see that it correctly displays the website pages right after ad results:
Search on a site using Google on WordPress
To add a search to the main page, you need to edit the front-page.php template separately and add the search code to it.

Conclusion

A user-friendly website search is important for any large resource. You can set up an advanced search on the website using special modules or ready-made solutions from search engines.

Google Search on a website allows you to customize and configure the interface, use additional parameters, and quickly receive detailed statistics on requests from website visitors.

This article is a part of Serpstat's Checklist tool
Checklist at Serpstat" title = "How to build an internal search on your website 16261788338383" />
Checklist is a ready-to-do list that helps to keep reporting of the work progress on a specific project. The tool contains templates with an extensive list of project development parameters where you can also add your own items and plans.
Try Checklist now

Speed up your search marketing growth with Serpstat!

Keyword and backlink opportunities, competitors' online strategy, daily rankings and SEO-related issues.

A pack of tools for reducing your time on SEO tasks.

Get free 7-day trial

Rate the article on a five-point scale

The article has already been rated by 0 people on average out of 5
Found an error? Select it and press Ctrl + Enter to tell us

Discover More SEO Tools

Tools for Keywords

Keywords Research Tools – uncover untapped potential in your niche

Serpstat Features

SERP SEO Tool – the ultimate solution for website optimization

Keyword Difficulty Tool

Stay ahead of the competition and dominate your niche with our keywords difficulty tool

Check Page for SEO

On-page SEO checker – identify technical issues, optimize and drive more traffic to your website

Share this article with your friends

Are you sure?

Introducing Serpstat

Find out about the main features of the service in a convenient way for you!

Please send a request, and our specialist will offer you education options: a personal demonstration, a trial period, or materials for self-study and increasing expertise — everything for a comfortable start to work with Serpstat.

Name

Email

Phone

We are glad of your comment
I agree to Serpstat`s Privacy Policy.

Thank you, we have saved your new mailing settings.

Report a bug

Cancel
Open support chat
mail pocket flipboard Messenger telegramm