This site uses cookies and other tracking technologies to make possible your usage of the website, assist with navigation and your ability to provide feedback, analyse your use of our products and services, assist with our promotional and marketing efforts, and provide better user experience.

By using the website, you agree to our Privacy policy

Accept and continue

Report a bug

Cancel
93
How-to 6 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
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

Learn how to get the most out of Serpstat

Want to get a personal demo, trial period or bunch of successful use cases?

Send a request and our expert will contact you ;)

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

Share this article with your friends

Sign In Free Sign Up

You’ve reached your query limit.

Or email
Forgot password?
Or email
Back To Login

Don’t worry! Just fill in your email and we’ll send over your password.

Are you sure?

Awesome!

To complete your registration you need to enter your phone number

Back

We sent confirmation code to your phone number

Your phone Resend code Queries left

Something went wrong.

Contact our support team
Or confirm the registration using the Telegram bot Follow this link
Please pick the project to work on

Personal demonstration

Serpstat is all about saving time, and we want to save yours! One of our specialists will contact you and discuss options going forward.

These may include a personal demonstration, a trial period, comprehensive training articles & webinar recordings, and custom advice from a Serpstat specialist. It is our goal to make you feel comfortable while using Serpstat.

Name

Email

Phone

We are glad of your comment
Upgrade your plan

Upgrade your plan

Export is not available for your account. Please upgrade to Lite or higher to get access to the tool. Learn more

Sign Up Free

Спасибо, мы с вами свяжемся в ближайшее время

Invite
View Editing

E-mail
Message
Optional
E-mail
Message
Optional

You have run out of limits

You have reached the limit for the number of created projects. You cannot create new projects unless you increase the limits or delete existing projects.

I want more limits