# Clarifying custom home page routing

**URL:** <https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613>\
**Category:** Developer help\
**Created:** [August 23, 2018, 8:26pm UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613 "2018-08-23T20:26:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![deltoid](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@deltoid](https://forum.ghost.org/u/deltoid)\
**Post date:** [August 23, 2018, 8:26pm UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613/1 "2018-08-23T20:26:10Z")

</div>

Hi, I just setup a fresh install of the latest version of Ghost with the aim of separating the home page from blog. The Ghost 2.0 post says it’s possible to set “a custom homepage on / with posts published on /blog/”, but regarding the installation, should I be setting the website to / or /blog/?

I’ve installed it on / for now, and had a look at the routing documentation, but I didn’t find it too clear, I changed the routes file to include  
routes:  
/: home  
but wasn’t really sure how to follow this up, where do I include the home.hbs file? and if I want to set /blog/ to the standard ghost home, what would I enter?

Thanks for any clarity on these issues

---

<div class="post-metadata">

**Author:** ![tawandabrandon](https://avatars.discourse-cdn.com/v4/letter/t/919ad9/32.png) [@tawandabrandon](https://forum.ghost.org/u/tawandabrandon)\
**Post date:** [August 24, 2018, 8:48am UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613/2 "2018-08-24T08:48:18Z")

</div>

I think the easiest way you an achieve that without breaking anything lol, would be to have your landing / home page as anykind of HTML theme you want; then just install it in the root directory for your webserver.

Then you move over to your NGINX configuration and send all requests for ‘/’ to the static files

but then let every other request be sent to Ghost

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [August 24, 2018, 8:53am UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613/3 "2018-08-24T08:53:37Z")

</div>

@tawandabrandon that was definitely the case before Ghost 2.0 but is no longer necessary

@deltoid you would set up Ghost on `/` then modify your `routes.yaml` to look something like this:

```auto
routes:
  /: home

collections:
  /blog/:
    permalink: /blog/{slug}/
    template: index

taxonomies:
  tag: /blog/tag/{slug}/
  author: /blog/author/{slug}/

```

Then your homepage uses `home.hbs` and lives on `/` and all of your posts, tags, author pages, etc live under `/blog/`

---

<div class="post-metadata">

**Author:** ![deltoid](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@deltoid](https://forum.ghost.org/u/deltoid)\
**Post date:** [August 24, 2018, 5:42pm UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613/4 "2018-08-24T17:42:02Z")

</div>

Thank you for the assistance, but I now get an error: 500

Cannot read property ‘match’ of undefined

This appears on / directory, everything seems to be working fine on /blog

have I not got the home.hbs in the right directory? I’ve tried moving it around, and looking in the admin panel, but I’m at a loss

---

<div class="post-metadata">

**Author:** ![Kate](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kate/32/35_2.png) [@Kate](https://forum.ghost.org/u/Kate)\
**Post date:** [August 24, 2018, 5:56pm UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613/5 "2018-08-24T17:56:35Z")

</div>

> [@deltoid](#):
>
> Cannot read property ‘match’ of undefined

That sounds like a broken template (incorrect usage/syntax). Did you fix it already?

---

<div class="post-metadata">

**Author:** ![deltoid](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@deltoid](https://forum.ghost.org/u/deltoid)\
**Post date:** [August 24, 2018, 6:10pm UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613/6 "2018-08-24T18:10:36Z")

</div>

nope ☹ is this incorrect syntax in the routes.yaml file?

---

<div class="post-metadata">

**Author:** ![Kate](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kate/32/35_2.png) [@Kate](https://forum.ghost.org/u/Kate)\
**Post date:** [August 24, 2018, 6:15pm UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613/7 "2018-08-24T18:15:37Z")

</div>

Maybe. Can you share your routes.yaml and the full error log from the server?

---

<div class="post-metadata">

**Author:** ![deltoid](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@deltoid](https://forum.ghost.org/u/deltoid)\
**Post date:** [August 24, 2018, 6:26pm UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613/8 "2018-08-24T18:26:45Z")

</div>

my routes.yaml file was just copy and pasted from above

what’s the best way to share the error.log file?

---

<div class="post-metadata">

**Author:** ![Kate](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kate/32/35_2.png) [@Kate](https://forum.ghost.org/u/Kate)\
**Post date:** [August 24, 2018, 6:34pm UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613/9 "2018-08-24T18:34:20Z")

</div>

I’ve copied it too - the syntax is correct. So looks like it’s your template?

> what’s the best way to share the error.log file?

Copy the error message with the last 5 lines of the stack in code back sticks.

* * *

You could also figure this out yourself, by not using the home.hbs template or the index.hbs and then restart Ghost. By that you can identify, which template might be wrong - if it’s the template 🤪

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [September 7, 2018, 6:34pm UTC](https://forum.ghost.org/t/clarifying-custom-home-page-routing/2613/10 "2018-09-07T18:34:22Z")

</div>

Closed on September 7, 2018, 6:34pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
