#StandWithUkraine

What RSS feed really is

I’ve recently read yet another post about RSS… Blogging gurus say that every blog should have post explaining RSS and we do.

Strangely these pages are extremely bad at explaining RSS. They do contain plenty of convincing words to make you subscribe, but generally there is zero effort to actually explain.

So do you want to know what it really has inside? Read on.

RSS feed is plain text file that is structured according to rules of XML markup language and hosted on web-page. From where feed readers can grab and process it.

<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Software updates</title>
<description>
Updates for software featured at www.Rarst.net</description>
<link>https://www.Rarst.net</link>
<lastBuildDate>Thu, 25 Sep 2008 21:54:37 +0200</lastBuildDate>
<generator>RSSUpdGen by Rarst</generator>
<item>
<title><![CDATA[CCleaner 2.12.651]]></title>
<description><![CDATA[CCleaner 2.12.651<br />

Read more at <a href="https://www.rarst.net/software/ccleaner/">
https://www.rarst.net/software/ccleaner/</a><br />

Download at <a href="http://www.ccleaner.com/download/builds">
http://www.ccleaner.com/download/builds</a>]]></description>
<pubDate>Thu, 25 Sep 2008 21:54:37 +0200</pubDate>
<link><![CDATA[http://www.ccleaner.com/download/builds]]></link>
<guid isPermaLink="false"><![CDATA[CCleaner 2.12.651]]></guid>
</item>
</channel>
</rss>

This is example of real RSS feed I create for generating software updates list in my sidebar. Looks scary? But it really isn’t – just pay attention to tags (those words between <>). They are made to be human-readable which is one of XML (and in turn RSS) strong points.

  • version tags in the beginning tell us (and software that reads feed) versions of XML and RSS used. XML is always 1.0 and I generally go with 2.0 version of RSS because it’s really easy to create and work with;
  • channel contains information about feed and feed entries (items). Notice how channel ends up in the end only followed by rss tag;
  • title is name of feed;
  • description is human-readable description of feed content and purpose;
  • link is a site that feed comes from;
  • lastBuildDate is time when feed was created or last edited. It must be in RFC 822 time format which is human-readable (but huge pain to code);
  • generator is name of software that created feed. In this case I am using small program I coded for myself in AutoIt;
  • item is one feed entry. Feed usually contains few of them, I left one for simplicity:
    • title again, but now we are inside item so it is name for this item. Notice how it is enclosed in additional CDATA brackets – this is done so there is less risk of special characters breaking XML rules and feed itself;
    • description again, but inside item it’s actual content of an entry. It may be text but usually it has (X)HTML markup so can have rich formatting, include images, etc;
    • pubDate – time when item was created;
    • link – outgoing link for item. In this case to download page. This is actually rare tag in feeds, see next one for explanation;
    • guid is one of the most important tags. It is unique identifier of an item. So even if item itself changes but guid remains the same it won’t highlight as updated. In feeds guid usually contains link. Since it doesn’t make sense for few items to point to the same link it acts as good identifier. Feed readers assume guid is a link by default. In this case it fails. If I update item download link still remains same so it won’t show as updated in feed readers. So I am using combination of program name and version as identifier and adding isPermaLink=false parameter to notify feed readers that they should look for link elsewhere (in this case in link tag above).

RSS feed is XML file of specific RSS format that contains structured information about feed itself as well as entries in it.

Because it is text RSS feeds are easy to work with and to code software for creating and processing them. There are more tags to be used and all of them are described in RSS 2.0 specification.

Lost in technical details? Ask questions about feeds in comments, I like to talk about them. :)

Related Posts

8 Comments

  • Ben from frogstr #

    Good job at explaining what a RSS feed is from a technical view! Will certainly be useful to some people wanting to build a feed manually.
  • Rarst #

    @Ben Yep, there are plenty CMS and such that export to feeds. But there is no decent software if you need to make feed the way you want. When I started to writing third feed generator for myself I actually thought that I could as well write RSS framework for myself. Working on it little by little.
  • Luis Gross #

    Wow! This has to be the best "what is RSS" post I've ever read. You certainly are correct; most of the gurus who write a post on "what is RSS" are usually describing to you how to go and subscribe rather than what it actually is and can do for you. I thought about writing one of those posts and placing it in my subscription box, but it would be too similar to Problogger. Recently, I received a comment from a reader saying RSS sucks because the majority of people don't know what it is, so they don't use it --- and it's just us tech geeks that know about it. Based on that comment I thought about writing the post again, but backed out from it and figured the email option can make up for it. This was truly informative and the best post decribing RSS I've seen in the blogosphere! Thanks for sharing Rarst!
  • Rarst #

    @Luis Gross My impression is that RSS is very dumbed down in blogosphere. Bloggers try to increase subscriber count because other bloggers say that subscriber count should be increased. It's a loop. I suspect good chunk of bloggers are actually clueless about RSS but still try to promote their feed. RSS is splending technology. And what's interesting - it's times easier to understand than (X)HTML for example. It took me few books and plenty of practice to grasp (X)HTML/CSS but only one evening with specification to grasp RSS. Bloggers shouldn't chase after subscribers to boost their counter, they should chase after subscribers to educate and provide value of RSS for their readers.
  • Nihar #

    Rarst great post!!!. Nice explanation of what RSS feed is.. Thanks
  • Rarst #

    @Nihar Now you know what link to send if someone asks you what RSS is. ;)
  • Josh #

    Hey, great post! Really useful, in fact I may create something similar to the kind of feed you have in your sidebar for software updates...
  • Rarst #

    @Josh Glad you find it useful. :) You can alway contact me if you need help setting that up.