How to Create an RSS Feed
In the second installment of RSS how-to, we look at some of the nonrequired (optional) channel and item tags, discuss RSS specifications in-depth and look at feed syndication and aggregators.
Last week we discussed RSS, the acronym used to describe the de facto standard for syndicating Web content, and we provided step-by-step instructions to help you create your own basic RSS feed using the required elements ("tags"). This week we'll discuss some of the non-required (optional) channel and item tags, discuss RSS specifications a little more in-depth, and also look at feed syndication and aggregators.
Optional Channel Elements
In creating our first RSS feed, we used only the basic required tags needed to create a working RSS document (also called an RSS feed). These elements, as defined by the RSS 2.0 specification, are called channel elements and the required <channel> elements include <title>, <link>, and <description>.
When creating an RSS document you can also use other optional <channel> sub-elements like <language>, <copyright>, <managingEditor>, <webMaster>, <generator>, <pubDate>, and others, as defined in the RSS 2.0 Specification.
<language> The language the channel is written in (view the RSS Language Codes here).
<copyright> Copyright notice for content in channel
<managingEditor> e-mail contact for editorial content
<webMaster> e-mail contact for technical issues.
<pubDate> The publication date for the content in the channel.
<lastBuildDate> The last time the content of the channel changed.
<category> Specify one or more categories that the channel belongs to.
<generator> Indicate the program used to generate the channel.
<docs> A URL that points to the documentation for the format used in the RSS file
<cloud> Allows processes to register with a cloud to be notified of updates to the channel
<ttl> "Time To Live". Specify a number of minutes that indicates how long a channel can be cached before refreshing.
<image> A GIF, JPEG or PNG image that can be displayed with the channel.
<rating> PICS rating for the channel.
<textInput> A text input box that can be displayed with the channel.
<skipHours> Tells aggregators telling them which hours they can skip.
<skipDays> Tells aggregators telling them which days they can skip.
Optional channel elements are added in the beginning of your feed, after the open <channel> tag and before your first <item> tag. Using our example RSS code, this is how the code might look with several optional channel elements included. The basic required code we've done previously is in blue, with the new optional tags in blue/bold.
Just like you can add extra tags and the corresponding information within your <channel> tag, you can also add specific, but again optional, information between the <item> tags. Last week we discussed the main item elements (title, link, and description), but using the RSS 2.0 specification, for example offers additional elements that you can include between the open and close <item> tags. Examples of optional <item> tags include author, category, comments, and others, as defined in the RSS 2.0 Specification. Remember these optional tags will need to be included as open and closed tags.
<author> E-mail contact for item author
<category> Put the item in one or more categories
<comments> URL of a page for comments related to the item
<enclosure> Describes a media object attached to the item.
<guid> A string that uniquely identifies the item.
<pubDate> When the item was published.
<source> The RSS channel that the item came from
Copying only the first <item> from the code example above, here is the same required elements along with examples of some of the optional item elements included:
Know the Specifications
The best way to learn how to extend your RSS document past the basics is to actually start with the basic code (as shown in Part I: How to Create an RSS Feed), and read the RSS specifications to learn the optional tags and how to use them when creating your RSS document. You can learn more about current RSS Specifications from the RSS Specifications Web site, or at the RSS Advisory Board Web site.
The most current specification (which happens to be 2.0.10 as of the time of publishing) can always be found at this URL (RSS Advisory Board Web site).
RSS 2.0 Specification: Version 2.0.10 of the RSS 2.0 specification, published by the RSS Advisory Board on Oct. 15, 2007.
RSS 2.0 Specification: This is the original RSS 2.0 specification published by UserLand Software on August 19, 2002.
RSS 0.92 Specification: This is the RSS 0.92 specification published by UserLand Software on December 25, 2000.
RSS 0.91 Specification: This is the RSS 0.91 specification published by UserLand Software on June 9, 2000.
RSS 0.91 Specification: This is the RSS 0.91 specification published by Netscape on July 10, 1999.
RSS 0.90 Specification: This is the RSS 0.90 specification published by Netscape on March 15, 1999.
If you have followed the tutorial through to this stage, you should now have your own newly created RSS feed (saved in xml format) with some optional elements. As we did last time, again you will want to use a Feed Validator to ensure the new elements you have added work. To do this, you just need to upload the document to a Web server, then enter the URL into the Feed Validator, like FEED Validator or RSS Validator.
For those who want to produce an RSS feed, but have had difficultly creating one using this tutorial (or those who simply prefer not to play around with code), you can use a feed editor to create and manage your RSS documents. Much like any mark-up editor, feed dditors generally provide a GUI (some include a wizard-based GUI), allowing you to create the RSS document without touching, or even knowing any code. Here are a few Feed editor options, and a Google search will produce many more.
RSS Wizard (HTML to RSS converter)
"How to Make Your Own RSS Feeds" on SmallBusinessComputing.com looks at ExtraLabs Software.s Feed Editor and NotePage.s FeedforAll.
"How to Create RSS feeds with Dreamweaver" on WebReference.com looks at using RSS Dreamfeeder, an application that allows you to reformat your content into an RSS feed within Dreamweaver.
What Do I Do With my RSS Feed?
Getting back to the basics, we need to remember that the point of creating RSS feeds is so that you have a way to tell others about the new content and headlines on your own Web site, or blog, without users having to load your Web site. With a feed, users can simply choose which headlines (or items) they are interested in and go directly to that content within your Web site. Others can also display your RSS feed on their site and your feed can also be fed to users on cellular phones, any of your co-brand or network sites, affiliate sites, and even distributed through various online news portals on RSS aggregation sites. You can also provide the RSS feed directly on your own site so you visitors can subscribe to the feed and see new headlines via an RSS reader. This distribution of your RSS feed is called feed syndication.
There are many online sites where you can submit your RSS feed URL, just like there are a large number of Web search engines and directories where you can submit your Web site URL. Here are a few general submission sites to get you started:
Technorati Ping Us
Avangate also offers a list of feed submission directories, as does the RSS-Specifications Web site. There are also some industry-specific RSS feed submission sites including those for health, technology, government, education, and other industry-specific feeds which you can find through a Google search.
- Part I: How to Create an RSS Feed (Page 1)
- Part II: How to Create an RSS Feed: Optional RSS Elements <'tags'>, Syndication and More (Page 2)
Based in Nova Scotia, Vangie Beal is has been writing about technology for more than a decade. She is a frequent contributor to EcommerceGuide and managing editor at Webopedia. You can tweet her online @AuroraGG.
Stay up to date on the latest developments in Internet terminology with a free weekly newsletter from Webopedia. Join to subscribe now.
Webopedia's student apps roundup will help you to better organize your class schedule and stay on top of assignments and homework. Read More »20 Ways to Shorten a URL
If you need to shorten a long URL try this list of 20 free online redirection services. Read More »Top 10 Tech Terms of 2015
The most popular Webopedia definitions of 2015. Read More »
This Webopedia study guide describes the different parts of a computer system and their relations. Read More »Network Fundamentals Study Guide
Networking fundamentals teaches the building blocks of modern network design. Learn different types of networks, concepts, architecture and... Read More »The Five Generations of Computers
Learn about each of the five generations of computers and major technology developments that have led to the current devices that we use today. Read More »