# Permalink to Discourse search

**URL:** https://meta.discourse.org/t/permalink-to-discourse-search/18818
**Category:** Feature
**Created:** [2014年八月13日 18:27 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818 "2014-08-13T18:27:05Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![dfabulich](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dfabulich/32/108716_2.png) [@dfabulich](https://meta.discourse.org/u/dfabulich)
#### Post date: [2014年八月13日 18:27 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/1 "2014-08-13T18:27:05Z")

</div>

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](https://meta.discourse.org/search) 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?

---

<div class="post-metadata">

### Author: ![trident](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trident/32/2078_2.png) [@trident](https://meta.discourse.org/u/trident)
#### Post date: [2014年八月13日 18:57 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/2 "2014-08-13T18:57:49Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dfabulich](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dfabulich/32/108716_2.png) [@dfabulich](https://meta.discourse.org/u/dfabulich)
#### Post date: [2014年八月13日 19:22 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/3 "2014-08-13T19:22:38Z")

</div>

> [@trident](#):
>
> 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](https://meta.discourse.com/search?term=whatever), 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?

---

<div class="post-metadata">

### Author: ![rubydoob](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rubydoob/32/103165_2.png) [@rubydoob](https://meta.discourse.org/u/rubydoob)
#### Post date: [2014年八月13日 19:25 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/4 "2014-08-13T19:25:49Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dfabulich](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dfabulich/32/108716_2.png) [@dfabulich](https://meta.discourse.org/u/dfabulich)
#### Post date: [2014年八月13日 19:42 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/5 "2014-08-13T19:42:27Z")

</div>

> [@rubydoob](#):
>
> Your best bet might be creating a new standalone page

That does seem like the best way, but it sounds like it may be too big of a feature for my first engagement with Discourse code.

---

<div class="post-metadata">

### Author: ![rubydoob](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rubydoob/32/103165_2.png) [@rubydoob](https://meta.discourse.org/u/rubydoob)
#### Post date: [2014年八月13日 19:47 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/6 "2014-08-13T19:47:01Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2014年八月13日 21:14 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/7 "2014-08-13T21:14:26Z")

</div>

We don’t have a dedicated search page, it’s on our roadmap possibly in the next few months

---

<div class="post-metadata">

### Author: ![lindseym](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lindseym/32/115493_2.png) [@lindseym](https://meta.discourse.org/u/lindseym)
#### Post date: [2015年一月21日 01:27 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/8 "2015-01-21T01:27:51Z")

</div>

We’d love to implement this on our Discourse. Any updates on this?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年一月21日 04:02 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/9 "2015-01-21T04:02:33Z")

</div>

Dedicated search page is on my task list some time in the next 30-60 days

---

<div class="post-metadata">

### Author: ![Fletcher](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@Fletcher](https://meta.discourse.org/u/Fletcher)
#### Post date: [2015年五月11日 17:55 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/10 "2015-05-11T17:55:18Z")

</div>

Echoing @lindseym, any updates on this?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年五月11日 21:26 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/11 "2015-05-11T21:26:30Z")

</div>

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..

---

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [2015年六月10日 10:31 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/12 "2015-06-10T10:31:48Z")

</div>

A search results page would greatly help with migrating other forums to Discourse by redirecting old URLs to searches for keywords in the post title.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年六月23日 03:08 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/13 "2015-06-23T03:08:27Z")

</div>

This now works:

[https://meta.discourse.org/search?q=permalink%20search](https://meta.discourse.org/search?q=permalink%20search)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年六月23日 03:08 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/14 "2015-06-23T03:08:32Z")

</div>



---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年六月23日 03:49 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/15 "2015-06-23T03:49:17Z")

</div>

Do we block the /search path via robots.txt? We better…

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年六月23日 03:51 UTC](https://meta.discourse.org/t/permalink-to-discourse-search/18818/16 "2015-06-23T03:51:00Z")

</div>

Yes

```plaintext
Disallow: /search
Disallow: /search/

```
