RSS 2.0 Feed XML Example

RSS feeds enable content syndication that puts your readers in control: they subscribe once in their feed reader of choice (Feedly, NetNewsWire, Reeder, Inoreader) and receive updates from all subscribed sites without needing to visit each site or rely on social media algorithms. For technical content, developer blogs, and newsletters, RSS readers remain a significant and highly engaged distribution channel. This example shows a complete RSS 2.0 feed with the required channel metadata and one item. The version="2.0" attribute identifies the RSS specification version. The xmlns:atom namespace and atom:link element are a best practice addition to RSS 2.0 that provides a self-referential link — while not required by the RSS 2.0 spec, it's recommended for better compatibility with feed aggregators and avoids some RSS validation warnings. Channel metadata elements: title is the feed's name as it appears in readers. link is the website the feed represents. description is displayed below the feed name in many readers. language (en-us) tells readers what language the content is in, enabling language-based filtering. lastBuildDate (in RFC 822 format) indicates when the feed was last updated. Item structure for a blog post: title is the post's headline. link is the canonical URL for the full post. description can contain either a plain-text excerpt or a full HTML article (wrapped in CDATA if HTML). pubDate in RFC 822 format (Mon, 31 Mar 2026 10:00:00 GMT) is what feed readers display as the post date and use for ordering items chronologically. guid is the permanent unique identifier for the item. The GUID is critically important: feed readers use GUIDs to determine whether an item has already been shown to the user. Once you publish an item with a specific GUID, you must never change it — even if the post URL changes. Using the canonical post URL as the GUID is the most common convention, but a UUID or stable database ID works equally well (and better if you ever restructure your URL scheme). CDATA for HTML descriptions: when including HTML in the description (for rich post previews), wrap it in <![CDATA[...]]>. CDATA sections tell the XML parser to treat the content as literal text rather than trying to parse HTML tags as XML elements. Without CDATA, HTML tags in the description cause the feed to be invalid XML and fail to parse in strict feed readers. Real-world scenarios: a technical blog that syndicates to dev.to and Hashnode, which both consume RSS feeds; a podcast where the RSS feed includes enclosure elements pointing to audio files; a newsletter that publishes web archives accessible via RSS for readers who prefer feed-based consumption. Tips: validate your feed with the W3C Feed Validator (validator.w3.org/feed) before deploying and whenever you make structural changes. Serve your RSS feed with the correct content type: application/rss+xml.

Example
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>My Dev Blog</title>
    <link>https://blog.example.com</link>
    <description>Tutorials on web development and DevOps</description>
    <language>en-us</language>
    <lastBuildDate>Tue, 01 Apr 2026 09:00:00 GMT</lastBuildDate>
    <atom:link href="https://blog.example.com/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>Getting Started with Cron Jobs</title>
      <link>https://blog.example.com/cron-jobs</link>
      <description>Learn how to schedule tasks with cron expressions.</description>
      <pubDate>Mon, 31 Mar 2026 10:00:00 GMT</pubDate>
      <guid>https://blog.example.com/cron-jobs</guid>
    </item>
  </channel>
</rss>
[ open in XML Formatter → ]

FAQ

What is the difference between RSS and Atom?
Both are XML feed formats for content syndication. Atom is more strictly defined and uses ISO 8601 dates. RSS 2.0 is more widely supported and uses RFC 822 dates. Most feed readers support both.
What should the GUID contain?
The GUID should be a permanent, unique identifier for the item. Using the canonical URL is common, but for posts that may move, a stable UUID or permalink is better since GUIDs must never change once published.
Can I include HTML in the description?
Yes. Wrap the content in a CDATA section: <description><![CDATA[<p>HTML content here</p>]]></description>. This prevents the parser from interpreting HTML tags as XML elements.

Related Examples