# Link from post to plugin route leads to 404

**URL:** https://meta.discourse.org/t/link-from-post-to-plugin-route-leads-to-404/130218
**Category:** Development
**Created:** [October 4, 2019, 9:44am UTC](https://meta.discourse.org/t/link-from-post-to-plugin-route-leads-to-404/130218 "2019-10-04T09:44:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nkls](https://avatars.discourse-cdn.com/v4/letter/n/71e660/32.png) [@nkls](https://meta.discourse.org/u/nkls)
#### Post date: [October 4, 2019, 9:44am UTC](https://meta.discourse.org/t/link-from-post-to-plugin-route-leads-to-404/130218/1 "2019-10-04T09:44:23Z")

</div>

I have written a plugin that appends a route like this:

./plugin.rb:

```
after_initialize do
  load File.expand_path('../app/controllers/plugin_controller.rb', __FILE__ )
  Discourse::Application.routes.append do
    get '/plugin' => 'plugin#index'
  end
end

```

./assets/javascripts/discourse/plugin-route-map.js.es6:

```
export default function () {
  this.route('plugin', { path: '/plugin' });
}

```

A link to [https://discourse.sld.tld/plugin](https://discourse.sld.tld/plugin) throws a 404 when clicked in a post. Opening [https://discourse.sld.tld/plugin](https://discourse.sld.tld/plugin) in the browser or opening the link in a new tab/window works.

What can I do to make the link in the post work?

Any help would be appreciated.
