---
title: Publish an RSS feed
description: "Confirm /rss.xml is on, give every post a date so it appears in the channel, and point CanonicalBaseUrl at your production origin so links resolve."
canonical_url: https://usepennington.net/how-to/feeds/rss/
sidecar_url: https://usepennington.net/how-to/feeds/rss.md
content_hash: sha256:465eb22471883246212c3ffd1ad20eb5eede813e4aaca0ce83cf7ce0c57283c9
tokens: 974
uid: how-to.feeds.rss
reading_time_minutes: 2
---

Guides
# Publish an RSS feed

Confirm /rss.xml is on, give every post a date so it appears in the channel, and point CanonicalBaseUrl at your production origin so links resolve.

 
`/rss.xml` is wired by `UseBlogSite` and enabled by default — `BlogSiteOptions.EnableRss` defaults to `true`. Two things break a working feed: a post missing `date:` (silently dropped from the channel), and an unset `CanonicalBaseUrl` (feed links emit relative URLs that aggregators cannot follow). The feed endpoint ships with the BlogSite template; to emit a feed from a bare `AddPennington` host or any non-blog content type, see [Publish a custom feed from a content service](https://usepennington.net/how-to/feeds/custom-feed.md).

 
## Before you begin

 
 - A working BlogSite (see [Scaffold a blog with BlogSite](https://usepennington.net/tutorials/blogsite/scaffold.md) if not)
 - Posts under `Content/Blog/` that parse as `BlogSiteFrontMatter`
 - A known production origin (such as `https://blog.example.com`). `CanonicalBaseUrl` needs the scheme and no trailing slash
 
 
---

 
## Options

 
### Give every post a `date:`

 
The `/rss.xml` feed builds the channel from posts where `Date` is non-null, ordered by descending date. A post without `date:` renders normally at its URL but does not appear in the feed. Use ISO-8601 (`2024-01-15`) so YAML parses the value as a `DateTime`.

 
Minimal front matter for a post that appears in the feed:

 
```yaml
title: Getting started with Pennington
description: A first-post walkthrough.
date: 2024-01-15
author: Jamie Rivers
tags: [pennington, getting-started]
```

 
### Set `CanonicalBaseUrl` to your production origin

 
The feed prefixes every `<link>` and `<guid>` with the canonical base. Use the production scheme and host with no trailing slash:

 
```csharp
new BlogSiteOptions
{
    CanonicalBaseUrl = "https://blog.example.com",
    // ...
}
```

 
---

 
## Result

 
`/rss.xml` returns an RSS 2.0 channel listing every dated post, newest first, with absolute URLs:

 
```xml
<rss version="2.0">
  <channel>
    <title>Jamie's Blog</title>
    <link>https://blog.example.com/</link>
    <description>Notes on shipping software.</description>
    <item>
      <title>Getting started with Pennington</title>
      <link>https://blog.example.com/blog/getting-started-with-pennington/</link>
      <guid>https://blog.example.com/blog/getting-started-with-pennington/</guid>
      <pubDate>Mon, 15 Jan 2024 00:00:00 +0000</pubDate>
      <description>A first-post walkthrough.</description>
    </item>
  </channel>
</rss>
```

 
## Verify

 
 - Run `dotnet run` and fetch `/rss.xml`. Expect a `<rss version="2.0">` document with one `<item>` per dated post, newest first
 - Inspect one `<item>`. `<link>` and `<guid>` start with the `CanonicalBaseUrl`, not a relative `/blog/...` path
 - Posts without a `date:` field are absent from the channel. When an expected post is missing, add `date:` to its front matter
 - After a static build (see [Build a static site](https://usepennington.net/how-to/deployment/static-build.md)), `output/rss.xml` exists and carries the same dated items with absolute `CanonicalBaseUrl` links
 
 
## Related

 
 - How-to: [Publish a custom feed from a content service](https://usepennington.net/how-to/feeds/custom-feed.md)
 - Reference: [Pennington.BlogSite.BlogSiteOptions](https://usepennington.net/reference/api/blog-site-options.md)
 - Reference: [Built-in BlogSite routes](https://usepennington.net/reference/blogsite/routes.md)
 - Reference: [Front matter key reference](https://usepennington.net/reference/front-matter/keys.md)
 
 
[Previous
                
                Make the site discoverable to LLM crawlers](https://usepennington.net/how-to/feeds/llms-txt.md)[Next
                    
                Publish a custom feed from a content service](https://usepennington.net/how-to/feeds/custom-feed.md)