On this page
What this issue is
A visitor types a word into your search box and presses Enter. Instead of a results page, they land on a "Page not found" screen. The search form itself works, but the address it submits to is wrong or no longer exists.
This is different from search that loads but returns nothing for obvious terms. Here the results page never loads at all.
Common causes: a theme update that changed the search route, a hard-coded old domain or path in the form action, a redirect rule or migration that removed the search URL, a missing results template, or a language or subfolder prefix that the form leaves out.
Why it costs you leads or sales
People who use search usually know what they want. A 404 at that moment is a dead end, and many will leave rather than browse. You lose the visitors who were closest to buying or enquiring.
- Visitor types a querySearch box works
- Form submitsGoes to a wrong action URL
- Results pageShows 404
- Product or formNever reached
The form submits, but the results URL returns a 404, so every later step is lost.
Example: 200 visitors use search in a week. With a working results page, more reach a product page than when search ends in a 404.
How to check if your site has it
Search a real term
Type a product name or topic you know exists, then press Enter. Note whether a results page loads.
Try the button and the Enter key
Some themes break only one of them.
Check it on desktop and mobile
Headers often have separate search forms for each, and one may be outdated.
Read the URL you land on
Compare it with your real search page, for example /search?q=term or /?s=term.
Inspect the form
Right-click the box, choose Inspect, and look at the form's action and method attributes and the input's name.
Test other languages and subfolders
Try the search on every language version of the site.
The visitor submits a query and lands on an error page.
How to fix it
First find the real URL of your results page by running a search from a page where it works, such as another template. Then make every search form point to that URL.
Use the standard search form
In your theme, use get_search_form() or the Search block, which submit to /?s=term. Avoid hard-coded actions.
Check the template
Make sure the theme has search.php or a Search Results template (Appearance > Editor > Templates in block themes). Without a fallback, index.php or the 404 template is used.
Refresh permalinks
Go to Settings > Permalinks and click Save Changes. Then disable redirect or security plugins one at a time to see if one blocks ?s= requests.
Point the form to the search route
In Online Store > Themes > Edit code, the form action should be {{ routes.search_url }} with an input named q.
Check URL redirects
Go to Content > Menus > View URL Redirects and delete any redirect from /search.
Confirm the template exists
Your theme needs a search template or section. Compare with a fresh copy of your theme if it was removed.
Check the Search element
Select the search form in the Designer and confirm it is a Webflow Search element, not a plain form.
Confirm the results page
The Search Results page needs to exist and be published. Republish after any change.
Fix the form action
Use a path that exists, such as /search, and keep the input name your backend reads.
Fix the route and rewrites
Make sure your router, nginx or .htaccess rules serve the search path and do not rewrite it to a missing file.
<form action="/search" method="get" role="search">
<label for="site-search">Search</label>
<input id="site-search" type="search" name="q" required>
<button type="submit">Search</button>
</form>Broken
- Form action points to an old path
- Submitting shows a 404 page
- Visitors leave
Fixed
- Form action matches the live results route
- Results load for real queries
- Visitors reach products
How to confirm it's fixed
- Search a real term and get a results page with a 200 status
- Both the Enter key and the button work
- Desktop, mobile and any sticky header search all work
- Every language version works
- A term with spaces or special characters does not 404
- Results links lead to live pages
How to prevent it happening again
Search breaks most often after theme updates, migrations, redirect changes and new plugins. Add a quick search test to your release checklist and run it after each of those changes.
- Test search on staging before every theme or plugin update
- Keep the search route out of bulk redirect rules
- Avoid hard-coded domains in form actions
- Re-test search after a migration or a URL structure change
- Monitor the search journey on a schedule
How FunnelGuard handles this
FunnelGuard detects this only partly. It checks journey steps: if you set up a journey that types a query into your search box and submits it, FunnelGuard runs that step on a schedule from the EU or the US and flags the journey if a step fails. A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause.
What it does not do: it does not check every search form on your site, every language version, or the quality of the results. It does not judge whether results are relevant, and it only covers searches you include in a journey.
To cover the rest by hand, use the checks above after each theme change, test every header and mobile search form, and try each language. The Free plan includes 1 site and 2 journeys with daily checks and no card, and a free read-only website audit is available too.
Questions people ask
Why does my search box go to a 404 page?
The form is sending the query to a URL that does not exist. Common causes are an outdated form action, a theme update that changed the search route, a redirect that removed the search path, or a missing results template.
Why is my WordPress search showing page not found?
Usually the theme lacks a search results template, a plugin or redirect blocks the ?s= request, or the form action is hard-coded wrongly. Use the standard search form, save Settings > Permalinks, and disable plugins one at a time to find the cause.
How do I fix search on Shopify going to 404?
Make sure the search form action is {{ routes.search_url }} and the input is named q. Then check Content > Menus > View URL Redirects for any redirect from /search and delete it.
How do I check what URL my search form submits to?
Right-click the search box, choose Inspect, and find the surrounding form tag. Its action attribute is the destination, and the input's name is the parameter. Compare it with the URL of a working results page.
Can a search 404 hurt SEO?
Internal search pages are usually not meant to rank, so the main harm is lost visitors rather than rankings. Still, a broken search route can be a sign of wider redirect or URL problems worth checking.
Can FunnelGuard detect a search box that goes to a 404?
Partly. If you add a search journey, FunnelGuard runs it on a schedule and flags a failing step with a screenshot. It does not cover every search form, language version or the relevance of results.
Why does search work on desktop but 404 on mobile?
Many themes use a separate search form for mobile menus or sticky headers. That second form may have an old action. Inspect each form and update its action to the live results route.
Related issues
- CNV-323Site search returns no results for obvious termsFix guide
- CNV-325Search results link to dead productsFix guide
- CNV-326Filters return nothing or wrong productsFix guide
- CNV-329Search autocomplete brokenFix guide
- CNV-327Sort order brokenFix guide
- CNV-328Pagination/infinite scroll stops loadingFix guide