Site navigation · 11 Nov 2026 · 7 min read
Website search: when your site needs a search box and where it goes
A search box helps visitors who already know what they want. This guide explains which sites need one, how to place it, how to build a useful results page and how to learn from what people type.
The short answer
A website needs a search box when visitors often arrive with a specific item or question and the menu cannot reach it in a few clicks, as on stores, large blogs and help centres. Put it in the header, make the results page useful, and read the terms people search. A small site with a clear menu usually does not need one.
Does your website need a search box?
Website search is a box that looks through your own pages for the word a visitor types. It helps people who know what they want and do not want to browse for it. Whether it earns its space depends on how much you have and how visitors arrive.
| Type of site | Search box? | Reason |
|---|---|---|
| Brochure site with a handful of pages and a short menu | Usually not | Visitors can see everything from the menu in seconds |
| Online store with many products | Yes | Shoppers often arrive with a product name or code in mind |
| Blog or news site with a large archive | Yes | Readers look for a topic they half remember |
| Help centre or documentation | Yes | Visitors arrive with a problem and want the answer page |
| Directory or listings site | Yes, usually with filters too | Search and filters answer different questions |
| Service business with a few clear services | Rarely | A good menu and a contact page do the work |
| Members' area or portal | Often | Returning users look for known items |
Two further signals help. If your analytics shows many visitors leaving after one page, or your inbox is full of questions the site already answers, visitors may be failing to find things. Search can help, but check the menu first. A box that people rely on to find your basic pages is often a sign that the structure needs work, which the guide to maintenance versus redesign can help you weigh.
A poor search box is worse than none. If it returns odd results for obvious words, visitors learn not to trust it and may leave the site rather than try the menu.
Where website search should go on the page
Put it where visitors expect it: the top of every page, on the right or in the centre of the header. A visible box with a magnifying glass icon is understood almost everywhere. On a phone, a single icon that expands into a full-width field saves space, but do not bury it inside a menu on a store or a large content site, where search is a main way in.
Give the field a proper label for screen reader users, even if the label is visually hidden, and make the search button reachable with the keyboard. Pressing Enter should always run the search. Make the field wide enough that a typical query is visible as it is typed.
Search belongs in a few other places as well.
- On the error page, where it rescues a visitor who followed a broken link. The guide to designing a custom 404 page covers that screen.
- On the no-results page, so the visitor can try again without going back.
- On a help or contact page, next to the form, so a visitor can check whether their question is already answered.
What a useful results page looks like
The results page is where a search box succeeds or fails. It should repeat what the visitor typed, so they can correct a typo, and show a clear title and a short extract for each result so they can tell results apart. Put the most likely match first: an exact title match usually beats a page that mentions the word once.
Decide what the search covers. Many visitors expect it to include products, articles and service pages together, but some built-in tools search only a few fields, such as titles, so check what yours covers. Offer a way to narrow down if the result list is long, such as a type filter or a category.
Spend time on the empty state. When nothing matches, do not show a blank page. Say that nothing was found for the typed word, suggest checking the spelling, list a few of your most visited pages and show how to contact you. Whether the tool copes with misspellings or word variants depends on the product, so check its current documentation and test with common mistakes.
Result pages built from visitors' own queries are rarely something you want in Google, so ask your developer how they are handled, and check Google's current documentation on keeping pages out of the index before you decide.
Ways to add search to a website
| Option | Good for | Watch for |
|---|---|---|
| Search built into your content platform | Small and medium sites that want something quickly | Limited control over ranking, filters and what is searched |
| A plugin or app for your platform | Sites that need better matching or filters | Another piece of software to update and keep secure |
| A hosted search service | Large catalogues and archives that need fast, tolerant matching | Scripts from another provider, a possible subdomain, and a data-sharing question for your privacy notice |
| A custom search built into the site | Unusual content, strict rules about who sees what, or tight links to other systems | Cost of building and maintaining it |
If a hosted service asks you to use your own subdomain, someone will need to add a DNS record. The guide to DNS records explains what a CNAME is and why a wrong one can break a page. Keep the DNS change on a list with the date and the reason, so it is not lost when the site changes hands.
Whichever route you choose, a search box is a form field. The rules from the guide to website forms apply: a clear label, a large tap target, a sensible error message and a test on a phone.
How to see what visitors search for
The words people type into your search box are some of the clearest evidence you will get about what they cannot find. Capturing them takes a small setup.
In Google Analytics 4, one route is the site search option within enhanced measurement. Google's Analytics Help says the platform records a view_search_results event when a results page is shown, and it identifies the page by a query parameter in the address. By default it looks for q, s, search, query or keyword, and you can add other parameters in the advanced settings. To read the terms in an exploration, you register the search_term parameter as a custom dimension. GA4 has no built-in site search report. Test it by running a search on your own site and checking whether the address now contains one of those parameters. If your search does not put the term in the address, a developer can send a search event with the term instead. Check the current documentation because analytics settings change.
Do not confuse this with Search Console. Search Console shows what people typed into Google before reaching you. Your site search data shows what they typed after arriving.
Review the list once a month and act on it.
- Frequent terms that return nothing point to content you do not have, or to different words from those on your pages.
- Frequent terms for contact details, delivery or prices suggest those pages are too hard to find in the menu.
- Rising terms show interest worth a new page or section.
- Words that suggest the wrong audience can show where a page or advert is attracting the wrong visitors.
People sometimes type names, emails or order numbers into a search box. Treat that as personal data: filter it out of reports where you can, and mention search data in your privacy notice. Ask a lawyer about the rules in the countries you serve.
The old search box in Google results
Older tutorials tell you to add special markup so a search box appears under your listing in Google. Google stopped showing that feature, called the sitelinks search box, in November 2024, and has removed its documentation. Leaving the markup in place does no harm, but it no longer has a visible effect. Your on-site search is a separate tool for your visitors and is not affected.
Planning search into a build or redesign
Search is easiest to get right at the start. In a rebuild, decide early which content the search should cover, what appears in results and where the box sits on each template. The guide to the website redesign process shows where those decisions fit. If you want help scoping search for a new or existing site, Liftup Technologies' website development service is one place to start.
Related guides
- Website forms how to get more submissions
- Website maintenance vs redesign when fixing is enough
- Website redesign process step by step
- DNS Records Explained: A, CNAME, MX and TXT Records
- Website contact forms best practices
- What a startup website needs first
Questions and answers
Does my site need a search box?
It needs one if visitors often arrive with a specific item or question and your menu cannot reach it in a few clicks, as on stores, large blogs and help centres. A small site with a short menu rarely does. Check your analytics and inbox for signs that people cannot find things.
Where should the search box go?
Put it at the top of every page, in the header, where visitors expect it. On a phone, a search icon that opens a full-width field works well. Also place it on your error page and your no-results page.
How do I see what visitors search for?
Use the site search option in Google Analytics 4 enhanced measurement if your search puts the typed word in the address, then register the search term to read it in explorations. Otherwise a developer can send a search event. Check the current documentation, because analytics settings change.
Will a search box help my Google rankings?
A search box is for your visitors, not for Google, and it does not make pages rank. Its value comes from helping people find things and from showing you what they look for. The search box that Google once showed under listings was removed in November 2024.
What should the results page say when nothing is found?
Say that nothing matched the typed word, suggest checking the spelling and offer links to popular pages and a way to contact you. Keep the search field on the page so the visitor can try again. A blank page makes people leave.
Tell us what you are building.
A short call, a written plan and a fixed quote. No obligation.