# RSS feeds with Astro: static generation and cache-friendly updates

Ben Morin, 2026-08-05. https://bemorin.com/writing/rss-feed-astro-static-generation

> RSS is the quiet backbone of open web distribution. On a static Astro site, you can emit a feed at build time that stays fast, cheap to host, and honest about when content actually changed.

<h2>1) Why build-time beats dynamic for most blogs</h2>
<p>
  A feed that regenerates with your deploy is deterministic: the XML matches the HTML your readers see. You avoid surprise DB calls at the edge
  and keep caching rules boring — which is what you want.
</p>

<h2>2) Stable GUIDs and canonical URLs</h2>
<p>
  Each item should use a stable identifier (usually the canonical article URL). Changing slugs breaks subscribers’ readers; plan redirects if you
  must rename.
</p>

<h2>3) Dates: published vs updated</h2>
<p>
  Include <code>pubDate</code> from first publish time. If you materially revise an article, bump <code>lastBuildDate</code> at the channel
  level or expose an updated field if your template supports it — but avoid noisy churn for typo fixes.
</p>

<h2>4) Deployment and cache headers</h2>
<p>
  Serve <code>feed.xml</code> with sensible cache lifetimes. Many teams use short TTL at the CDN with purge-on-deploy so subscribers pick up
  changes quickly without hammering origin.
</p>
