# Use routes to route site.com/tag/podcast to site.com/podcast

**URL:** <https://forum.ghost.org/t/use-routes-to-route-site-com-tag-podcast-to-site-com-podcast/12901>\
**Category:** Developer help\
**Created:** [March 23, 2020, 2:07pm UTC](https://forum.ghost.org/t/use-routes-to-route-site-com-tag-podcast-to-site-com-podcast/12901 "2020-03-23T14:07:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshduffney](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@joshduffney](https://forum.ghost.org/u/joshduffney)\
**Post date:** [March 23, 2020, 2:07pm UTC](https://forum.ghost.org/t/use-routes-to-route-site-com-tag-podcast-to-site-com-podcast/12901/1 "2020-03-23T14:07:00Z")

</div>

I’m attempting to route [Domain error](https://joshduffney.ghost.io/tag/podcast/) to [Domain error](https://joshduffney.ghost.io/podcast/) using the route.yaml. After following the [documentation](https://ghost.org/docs/api/v3/handlebars-themes/routing/collections/) I create the route.yaml shown below, but when I go to the url the collection is empty. Any suggestions? Thank!

Here is the route.yaml configuration I have.

```
routes:

collections:
  /:
    permalink: /{slug}/
    template: index
  /blog/:
    permalink: /blog/{slug}/
    template: blog
    filter: tag:blog
  /podcast/:
    permalink: /podcast/{slug}/
    template: podcast
    filter: tag:podcast

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

```

**Tag setting:**

 ![Screen Shot 2020-03-23 at 9.02.47 AM](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/8/80ce7bed7272ceb3891d46c0bff6156e181056d1.png)

Tags on post are:  
Getting Started, Podcast

---

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [March 23, 2020, 2:34pm UTC](https://forum.ghost.org/t/use-routes-to-route-site-com-tag-podcast-to-site-com-podcast/12901/2 "2020-03-23T14:34:39Z")

</div>

When you create a collection you need to ensure the filtering parameters are unique. In your case the first collection isn’t filtering for anything, so all posts match that criteria. After that nothing will be left to match “blog” or “podcast” as collections treat posts exclusively (they can only exist in one collection).

If you want your home page to have all post types and only show podcasts on `/podcasts/` and blog posts on `/blog/` then you’ll want to use Channels instead:  
[https://ghost.org/docs/api/v3/handlebars-themes/routing/channels/](https://ghost.org/docs/api/v3/handlebars-themes/routing/channels/)

But if you want to split posts to only show blog posts on `/blog/` and podcasts `/podcasts/` and then have the remaining posts on the home page then you’ll want to use Collections more like this:

```yaml
collections:
  /:
    permalink: /{slug}/
    template: index
    filter: 'primary_tag:-[blog,podcast]'
  /blog/:
    permalink: /blog/{slug}/
    template: blog
    filter: 'primary_tag:blog'
  /podcast/:
    permalink: /podcast/{slug}/
    template: podcast
    filter: 'primary_tag:podcast'

```

Couple of things to note here: I’m using minus `-` to exclude blog posts and podcast posts from the index, and I’m using `primary_tag` to filter posts. The primary tag is the first tag applied and will always be unique. More info here in our docs:

> **[Ghost Themes - Dynamic URLs & Routing](https://ghost.org/docs/themes/routing/)**
>
> Build dedicated URL structures using Ghost's dynamic routing system, for custom homepages, podcasts, categories and more.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![joshduffney](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@joshduffney](https://forum.ghost.org/u/joshduffney)\
**Post date:** [March 23, 2020, 8:34pm UTC](https://forum.ghost.org/t/use-routes-to-route-site-com-tag-podcast-to-site-com-podcast/12901/3 "2020-03-23T20:34:19Z")

</div>

I got it working! I’ll be purchasing ghost and migrating my blog soon. Thank you so much for the detailed reply @DavidDarnes!

---

<div class="post-metadata">

**Author:** ![ijongkim](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ijongkim/32/6186_2.png) [@ijongkim](https://forum.ghost.org/u/ijongkim)\
**Post date:** [March 24, 2020, 4:52pm UTC](https://forum.ghost.org/t/use-routes-to-route-site-com-tag-podcast-to-site-com-podcast/12901/4 "2020-03-24T16:52:57Z")

</div>

Alternatively, if you just want the route for all Tag pages to be `/{tag_slug}/` instead of `/tag/{tag_slug}` you can modify your Taxonomies:

```auto
taxonomies:
  tag: /{slug}/
  author: /author/{slug}/

```
