How to make a podcast RSS feed

How to make a podcast RSS feed

Ghost includes automatic RSS feeds for your content out of the box, but you can also easily create a custom feed for your podcast with routes and templates.

Adding /rss/ to most URLs in Ghost produces an automatically generated RSS feed for your content. If you’re publishing a podcast on your Ghost site then you’ll probably want to create a custom RSS feed to distribute your podcast episodes to places like iTunes or Google Podcasts.

Automatic RSS feed generated by Ghost
Automatic RSS feed generated by Ghost

This tutorial walks you through how to create a fully podcast RSS feed fully optimized for iTunes by creating a custom template and dynamic routing.

Add a new route for your RSS feed

Let's create a new route for the RSS feed by editing the site's routes. Download the most up-to-date version of your routes.yaml file from Ghost Admin and open it in a code editor.

Let's first add a podcast collection, which will filter out our podcast posts from the homepage.

    permalink: /podcast/{slug}/
    filter: tag:podcast
    permalink: /{slug}/

Then, define a custom route for the RSS feed. This route specifies a custom template, podcast/rss, and that the content_type is XML, which is what's expected for an RSS feed.

    template: podcast/rss
    content_type: text/xml

All together, your routes.yaml file should look like this:

    template: podcast/rss
    content_type: text/xml
    permalink: /podcast/{slug}/
    filter: tag:podcast
    permalink: /{slug}/
    template: index
  tag: /tag/{slug}/
  author: /author/{slug}/

Upload your updated routes file to your Ghost site.

Create a custom RSS template

On the podcast/rss route, we told Ghost to look for a specific template to render the RSS feed. We now need to create that template.

Create the template by making a new file called rss.hbs in the podcast folder of your theme. iTunes and other podcast platforms require specific formatting in order to understand your feed. They define the type of RSS feed and some basic information about your podcast. Below is an example of what's required, which you can copy into your own template and replace with the necessary information:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content=""
        <copyright>{{@site.title}} Copyright {{date format="YYYY"}}</copyright>
        <atom:link href="{{@site.url}}/podcast/rss/" rel="self" type="application/rss+xml" />
        <lastBuildDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</lastBuildDate>
            <itunes:name>Your Name</itunes:name>
        <itunes:image href="{{img_url @site.icon absolute="true"}}"/>
        <itunes:category text="Technology"></itunes:category>

        {{#get "posts" filter="tag:podcast" include="tags,authors" as |episode|}}
            {{#foreach episode}}
                <link>{{url absolute="true"}}</link>
                <pubDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</pubDate>
                <guid isPermaLink="false">{{id}}</guid>
                <category><![CDATA[ {{}} ]]></category>
                <content:encoded><![CDATA[ {{content}} ]]></content:encoded>
                <enclosure url="{{og_description}}" length="0" type="audio/mpeg"/>
                <itunes:summary><![CDATA[ {{content}} ]]></itunes:summary>

You can copy and paste this exact implementation for your site, then go ahead and customize it to suit your needs! There are a couple of static variables which need to be adjusted, like your name, email, and iTunes category.

There’s also one very small hack/workaround that makes all of this work. The feed requires that you specify the podcast mp3/audio file URL for each episode. Because Ghost doesn’t have custom fields, we can repurpose the Facebook Description field for each post to store the link to the audio file. So wherever you upload your audio, just paste the provided URL into the Facebook Description and you should be all set.

Update routes.yaml and your active theme

Once you’re happy with your work, upload and update your active theme in Ghost Admin to enable your new RSS feed. Visit the feed at /podcast/rss/ to ensure it’s working as desired and submit it to iTunes 🎹


In this tutorial, you created a custom route and template to add a podcast RSS feed for iTunes and other podcast platforms to your Ghost site. Your podcast is now ready for the limelight!

If you're looking for other podcast tips and tricks when it comes to Ghost, check out the official Ghost podcasting theme, Wave, or come on over to our Forum, where creators and developers chat about all things Ghost.

On this page Introduction

How was the tutorial?

Be the first to know.

Join the Ghost developer community — sign up to get early access to the latest features, developer tools, and tutorials.

No spam. Once a month. Unsubscribe any time.