# My custom route generates 404

**URL:** https://meta.discourse.org/t/my-custom-route-generates-404/48170
**Category:** Development
**Created:** [August 3, 2016, 3:53pm UTC](https://meta.discourse.org/t/my-custom-route-generates-404/48170 "2016-08-03T15:53:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)
#### Post date: [August 3, 2016, 3:53pm UTC](https://meta.discourse.org/t/my-custom-route-generates-404/48170/1 "2016-08-03T15:53:43Z")

</div>

Hello,  
I’m trying to get new site section working..

I’ve got .json part succesfully serving data ([http://localhost/faq\_categories.json](http://localhost/faq_categories.json))

But for HTML request ([http://localhost/faq\_categories](http://localhost/faq_categories)) Discourse generates 404 not found “Oops! That page doesn’t exist or is private”. I do have proper erb.html file in place.

I think that routing is working correctly (otherwise there would be error). Is there any part of Discourse application that would prevent me to run this simple code correctly?

Can you please help me to find what am I missing? Thanks a lot…!

**`/discourse/config/routes.rb`**

> get “/faq\_categories” =\> “faq\_categories#index”

**`/discourse/app/controllers/faq_categories_controller.rb`**

> class FaqCategoriesController \< ApplicationController  
> def index  
> @faq\_categories = FaqCategory.all

> ```
> respond_to do |format|
> format.html do
> render :index
> end
> format.json do
> render_serialized(@faq_categories, FaqCategorySerializer)
> end
> end
> 
> ```
> 
> end  
> end

**`discourse/app/views/faq_categories/index.html.erb`**

> `
> 
> # Frequently Asked Questions
> `

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 3, 2016, 4:01pm UTC](https://meta.discourse.org/t/my-custom-route-generates-404/48170/2 "2016-08-03T16:01:20Z")

</div>

You need to wire the front-end part. Ember router needs to know about this route too.

---

<div class="post-metadata">

### Author: ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)
#### Post date: [August 3, 2016, 4:05pm UTC](https://meta.discourse.org/t/my-custom-route-generates-404/48170/3 "2016-08-03T16:05:28Z")

</div>

Thanks for reply! I though that when no error from ember.js is raised then its ok… Which files are essentially needed to start with (so I can debug step by step)?

---

<div class="post-metadata">

### Author: ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)
#### Post date: [August 3, 2016, 4:27pm UTC](https://meta.discourse.org/t/my-custom-route-generates-404/48170/4 "2016-08-03T16:27:48Z")

</div>

ahh… I’ve just found `/discourse/app/assets/javascripts/discourse/routes/app-route-map.js.es6`

Now it generates only header… I will look at it…
