The discussion addresses the lack of a dedicated search results page in Discourse, which complicates migrating from other forums like Vanilla. dfabulich initially sought a way to 301 redirect old search URLs, noting that the current URL returns a soft 404 error. trident explained that no separate page exists, suggesting alternatives like Google site search or a custom route to populate the search bar. rubydoob and dfabulich discussed the feasibility of creating a standalone page for better SEO and user experience, though it might be too complex for a first engagement.
Sam and codinghorror provided updates on the roadmap, indicating that a dedicated search page was planned but potentially delayed due to necessary infrastructure work. After several requests for updates from lindseym and Fletcher, Sam confirmed that the feature is now functional, providing a working link to the search results page. Finally, codinghorror raised a concern about search results being indexed by search engines, to which Sam confirmed that the /search path is blocked via robots.txt.
We’re importing a Vanilla forum to Discourse; as part of this migration, I’m writing a PHP script to 301 redirect old Vanilla URLs to new Discourse URLs. I’ve got most of them hooked up properly, but I’m having trouble with search URLs. I don’t see a way to 301 redirect a user to a Discourse search result.
Search results for '' - Discourse Meta returns “200 OK” but displays a 404-ish error message, “The page you requested doesn’t exist or is private.” (That seems like a “soft 404,” a bug.)
How, if at all, can I link to a Discourse search result page?
There currently is no separate page for search, as the drop down at the top is the only user facing search mechanism. You could direct out to a google site search (see the 404 page for an example), or add in a route that populates the search bar.
Walk me through this from an end user perspective. I guess I’d link to Search results for '' - Discourse Meta, but that’s not what the URL bar would show, right? Would it do a redirect/replaceState to the root of the forum? But then open the populated search bar to show results?
That seems like a big limitation to me, although I like how it currently works UX wise but directly linking to a search is a good thing to have.
@dfabulich Your best bet might be creating a new standalone page if you have allot of pages indexed in google for this or rely on this type of feature e.g. members may have links inside of posts that are linking to search result pages.
I understand. If you are pressed for time you could create a non-ember.js page and just call the search routine and display the results (until you get a proper solution in place).
No, this may be pushed back due to necessary infrastructure work (sysadmin technical debt). We need to have sites up and running and accessible for full page search to be relevant..