Typo Tolerance in Site Search: One Wrong Letter Should Not Cost You the Sale
Shoppers type fast, on phones, with thumbs. A search engine that demands exact spelling turns a ready buyer into a zero-results page over a single transposed letter.
Allow edit distance one on short terms and two on longer ones, correct against your own catalog vocabulary rather than a dictionary, and always show what you corrected so the shopper can undo it. A silent wrong correction is worse than no correction.
Edit distance, in shopper terms
Typo tolerance is usually implemented as Levenshtein distance: how many single-character insertions, deletions, substitutions, or swaps separate the typed term from a catalog term. Distance one catches most real typos: nikke for a shoe brand, tshrit, reciever. Distance two catches more and starts inventing matches the shopper never meant, which is why engines scale it by word length. A three-letter word at distance two is nearly a different word. A ten-letter word at distance two is usually still the same intent.
The catalog is the dictionary. A general English wordlist does not contain your brand names, your model numbers, or your product line's coined terms, and those are exactly the words shoppers mistype. Build the correction vocabulary from titles, brands, categories, and the search log itself.
Show your work
The interface rule is simple: state the correction. Showing results for the corrected term, with a link back to results for the literal one, converts a guess into a service. Hiding the correction converts it into a suspicion that the store is showing sponsored filler, and on a misfire, where the correction is wrong, the shopper has no path back to what they typed.
Never correct a term that returns good results as typed. If the literal query has a healthy result set, the shopper may be searching a real term your correction model does not know, a new brand, a slang term, a competitor's product name they expect you to match. Correction is a fallback for failure, not a rewrite of success.
Mine the log for your real typo list
Your zero and low result queries are a free research report. Sort them, and the top of the list will be misspellings of your own best sellers, seasonal terms typed from memory, and plural and spacing variants. Fix those in the synonym and correction data directly instead of waiting for the algorithm to learn them. Algorithms do not learn from your log unless someone wires the log to them.
Review it monthly. New products bring new names, and every new name arrives with its own family of typos that nobody predicted.
Mobile deserves its own pass through the typo data. Autocorrect creates a second family of errors that desktop never produces: correctly spelled words replaced by common ones, brand names turned into ordinary nouns. A search that handles keyboard typos and still fails on autocorrect substitutions has solved the smaller half of the phone problem, and phones are where most of the searching now happens.
Keep reading
Related guides on this site: zero-result searches and what to show instead query relaxation when strict search finds nothing More from Product recommendations shoppers actually want.
Frequently asked questions
What edit distance should site search allow?
Distance one for short words and up to two for longer words is the common working rule. Longer terms tolerate more edits before the match stops resembling the shopper's intent.
Should search correct a query that already has results?
No. Correction is a fallback for failed searches. If the literal term returns a healthy result set, rewriting it risks replacing the shopper's real intent with the engine's guess.
Why correct against the catalog instead of a dictionary?
Shoppers mistype brand names, model numbers, and coined product terms that no general dictionary contains. The catalog and the search log are where those words actually live.
How do I know which typos to fix first?
Sort the zero and low result query log. Misspellings of best sellers and seasonal terms dominate it, and fixing the top entries directly beats waiting for algorithmic learning.