Making website search useful: suggestions, typos and empty results
· 7 min read
Type "hp lazer printer catridge" into most small business sites and you get nothing. The item is in stock, sitting on a product page, but the search only matches exact words in the exact spelling used by whoever wrote the title. That gap between what people type and what the index contains is where website search quietly loses sales every day.
Fixing it does not usually mean replacing the whole site. Six improvements cover the majority of failures, and they can be adopted one at a time.
Suggestions while people type
Autocomplete does two jobs: it saves typing, and it teaches visitors what vocabulary your site uses. A dropdown that appears after two or three characters and shows five to eight options is enough.
What belongs in that dropdown depends on the site. A store benefits from matching product names with a small thumbnail and price, plus a few category shortcuts. A content site does better with article titles. Mixing types works well if each group carries a small heading, such as products, categories and help articles.
Three details matter in the implementation. Suggestions must be reachable with the arrow keys and selectable with Enter, not only by mouse. The list should be announced to screen readers as it updates, which is what the combobox pattern in the ARIA authoring practices is for. And requests should be debounced by a couple of hundred milliseconds so a fast typist does not fire a query per keystroke.
Forgiveness for spelling and spacing
Indian websites deal with several kinds of near-miss at once: genuine typos, transliterated words with several accepted spellings, British and American variants, and joined or split words.
- Typos: fuzzy matching that tolerates one character difference on short words and two on longer ones catches most mistakes without producing nonsense.
- Spacing: treat "t shirt", "t-shirt" and "tshirt" as the same query, and do the same for product codes with and without hyphens.
- Transliteration: words such as kurta, kurti, saree and sari need to be handled explicitly, since no fuzzy algorithm reliably links sari to saree.
- Plurals and stems: a search for "chairs" should find "chair".
Be careful with aggressive fuzziness on short queries. Allowing two character changes on a three-letter term returns almost anything and makes results look random.
Synonyms, because customers do not use your words
Your catalogue says "trousers" and buyers type "pants". Your help centre says "invoice" and customers type "bill". A synonym list is the cheapest single improvement most sites can make, and it costs nothing but attention.
Build it from your own search logs rather than guessing. Look for queries that returned nothing but describe something you clearly sell, then map them to the right term. Fifty to a hundred synonym pairs usually cover a small catalogue. Remember regional and Hindi-English mixes as well: "mobile" for phone, "cheque book" for chequebook, "AMC" for annual maintenance contract.
Ranking: what should come first
Matching is only half the work. If a query returns forty results, the order decides whether search succeeded.
Weight the fields
A match in a product title or article heading should count for far more than a match buried in a paragraph, and a match in a product code should be near-absolute. Most search engines let you assign field weights; setting them takes minutes and improves results immediately.
Consider business signals, carefully
Availability matters. Out-of-stock items should rank below available ones, or at least be labelled clearly. Popularity can help break ties. What should not happen is promoting high-margin items above genuinely relevant ones, because visitors notice and stop trusting the box.
Show enough to choose from
Each result needs a clear title, a line of context and, for products, a price and an image. A list of bare page titles forces people back to guessing. Where a result set is large, filters for category, price or date turn search into browsing, which is often what the visitor wanted anyway.
Empty results pages that still help
A page reading "No results found for your search" is a dead end, and dead ends are where visitors leave. A useful empty state does four things:
- Confirms what was searched, so the visitor can spot a typo themselves.
- Offers a corrected query when one is likely, in the familiar "did you mean" style.
- Suggests a way forward: popular categories, best-selling items or the most-read help articles.
- Offers human contact, such as a WhatsApp link or phone number, with the query carried over where possible.
Relaxing the query is another option worth building. If all the words together return nothing, run the search again with the least important word removed and label the results honestly as broader matches.
Reading your search logs
Search logs are the most direct feedback a website ever receives, because people type what they want in their own words. Set aside twenty minutes a month and look at four things:
- Top queries: anything searched constantly deserves a prominent link in the navigation or on the home page.
- Queries with no results: each is either a missing synonym, a missing page or a product worth stocking.
- Queries with results but no clicks: usually a ranking problem, or titles that do not match how people describe things.
- Repeated searches in one session: a sign the first attempt failed and the visitor is rephrasing.
If you use GA4, site search can be tracked as an event so these patterns are visible alongside the rest of your traffic. Many search plugins keep their own log as well, which is often easier to read.
A sensible order to make the improvements
Start with the empty-results page, since it costs the least and stops the worst leaks. Then add synonyms from your log, then field weighting, then typo tolerance, and add autocomplete last because it is the most work. Re-read the logs after each change to see whether failed searches are falling.
When the catalogue is large enough that database queries become slow, a dedicated search service is usually the next step. Our team can look at your current logs and say whether tuning is enough or a rebuild is justified; you can ask our experts with a sample of your failed queries.
Frequently asked questions
How many results should a search page show at once?
Ten to twenty for content sites and twenty to forty in a product grid works well, with clear pagination or a load-more button. What matters more than the number is that each result carries enough information to be judged without opening it.
Should search results open in a dropdown or on their own page?
Offer both. The dropdown handles quick, confident lookups, while a full results page is needed for browsing, filtering and sharing a link. Always let people press Enter to reach the full page instead of forcing them to pick a suggestion.
How do I handle searches in Hindi or mixed languages?
Decide which scripts you will support, then add the common transliterations of your main product words as synonyms. Full multilingual search needs a search engine with language-aware analysers, but a good synonym list handles most everyday mixed queries.
Is it worth showing the number of results found?
Yes, because it sets expectations and confirms the search ran. It also helps visitors judge whether to refine the query, particularly when a broad term returns hundreds of items.
Thinking about a website?
See what a package covers and what it costs, or ask us about your own project.