RSS on Your Website

This article was published by ComputorEdge, issue #2710, , as the cover article, in both their PDF edition (on pages 7-10) and their website.

Some people use the Internet for simply checking their email messages or visiting one or two favorite websites. But for the majority of "Netizens" out there, visiting dozens of websites every day is the norm. Admittedly, a portion of these websites are visited not because they offer fresh content updated daily, but rather because they offer a frequently-used service, such as online banking. But these utility websites are certainly outnumbered by "discretionary" websites that serve up the latest news from the worlds of finance, politics, sports, and more.

For all of us who hop from one well-worn website to another, it can easily become tedious and time-consuming to have to visit each one of these websites, determine what content we have not seen before, and filter out content on topics that are of no interest to us. Most if not all of these news junkies must sometimes wonder, "If only my computer could do this for me." Well, it can, if those favorite websites of yours are packaging up their content in RSS format and not just as Web pages. More of them are doing so all the time, and in this article I will discuss some ways that you can do the same for your own website.

But first, for the benefit of those readers who may be unfamiliar with RSS, let's consider what it is and how it can be spotted in the wild. When it first emerged on the scene in 1999, and during the following few years, RSS was an acronym for a couple different names. But nowadays, just about everyone has agreed that it stands for "Really Simple Syndication". In basic terms, it is a standard and highly structured format for publishing online content, designed to be read by computer programs.

Just as a newswire service will distribute its journalists' contributions as a "syndication", any website can syndicate its own news. This stream of content is known as an "RSS feed". As a result of using a standardized form of organizing the content, each RSS feed is thereby made easily readable by Web-based and desktop applications, known as RSS "readers" or "aggregators". Google Reader and BlogBridge are examples of each category, respectively. All newsreaders, including these two, allow you to specify all the websites whose RSS feeds you would like to subscribe to, and how you can filter and combine the content to suit your needs.

To determine if any one of your favorite websites is offered in RSS format, go to the website's home page and look for the standard RSS feed icon. It usually is located at the bottom of the home page or up in the right-hand corner, oftentimes close to the entry fields for searching the website or logging in.

RSS feed icon
Figure 1. RSS feed icon

All of the major Web browsers — including Firefox, Opera, and Microsoft's Internet Explorer 7 — will display the RSS icon in or near their address bars.

Major news websites, probably without exception, make their content available globally to all RSS users. You may be wondering if you could do the same, and what methods would be available for doing so. It depends upon the source of the content that you want to share with the world.

Borrowing and Blending

If you would like to leverage RSS feeds that already exist, you can use an application that mashes up the news feeds provided by other websites, thereby creating your own feed, which you can then syndicate from your own website. This approach offers several advantages: you do not have to invest the time and energy in developing brand new content for your feed, and you also do not have to even learn the RSS format, for it to work in the RSS aggregators used by the people who subscribe to your feed. But this approach also has some drawbacks: you are completely dependent upon other websites for your feed's content, and there is the possibility that you might violate national or international copyright law if you inadvertently fail to credit sources appropriately.

Should you choose to take this approach, there are several available applications that you can use, including CaRP, Feed Mix, Feed Combiner, and Jawfish. The prices and capabilities of these applications vary, and if none of them meet your needs, some online research should turn up alternatives.

If you wish to have an outside news feed displayed directly on your website, and you do not mind limiting yourself to just a single feed (instead of a combination of feeds, as discussed above), then take a look at Feed to JavaScript (Feed2JS). As the name implies, it is a JavaScript-based tool that displays the chosen feed's content anywhere on your Web pages, updates itself automatically, and allows you to customize the appearance of the feed's headlines.

Handcrafted with Care

If you would like to create your own content for your RSS feed, then you have a number of options. You can manually create the RSS file, or you can have the computer do the work for you — either using a desktop program or a Web-based service.

Assuming that you choose to build your news feed by hand, you will first want to learn the RSS format. It is based upon Extensible Markup Language (XML), which is also the basis for HyperText Markup Language (HTML), the format used by Web pages. To see an example of this format, go to the RSS feed for Slashdot — a top technical news website — and view the source within your browser (to do so, go to the View menu of your browser). At first glance, this particular news feed may appear quite complex and intimidating — especially to anyone unfamiliar with XML or HTML. Fortunately, the minimum required elements in a valid RSS feed are far less than what you will see in that Slashdot file, or in the RSS files of other major websites.

Consider a much simpler example:

<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0" xmlns:atom="">
<title>Sample Feed</title>
<description>Your sample RSS feed</description>
<webMaster> (Your Name)</webMaster>
<copyright>Copyright © 2009 you</copyright>
<lastBuildDate>Wed, 11 Feb 2009 09:35:00 PST</lastBuildDate>
<managingEditor> (Your Name)</managingEditor>
<atom:link href="" rel="self" type="application/rss+xml" />
<title>First RSS Item</title>
Some text...
<pubDate>Wed, 4 Feb 2009 00:00:00 PST</pubDate>

(Note that even though the format of this sample code is valid, the email address and the URL, are not valid, and are only used for illustrative purposes.)

An RSS file such as this sample one can be created using any plain text editor. You can even use a word processing program, such as Microsoft Word, as long as you save the file as text, and not as a Word document.

If you create a feed file by hand, be sure to run it through an RSS validator, just to confirm that the file does not contain any formatting errors. One such online program is Feed Validator, which can handle feeds in RSS, Atom, and KML formats.

Delegate It to a Computer

But why go to the trouble of building an RSS file by hand, when a computer can do it all for you, faster and with less risk of introducing one or more errors in the XML code? As before, you have some options. If the content that you wish to syndicate is already located in files on your local computer, and you have the programming skills and the interest in automating the process of generating your RSS file, then you can always write a computer program to do that — just as I have done, using the programming language Perl, to create the RSS feed for my own website.

Most people, however, do not have the time or interest to automate the process themselves, and so for them it would be more appropriate to use a third-party program for creating the feed file. There are many such programs available, including RSS Editor, RSSeditor/Win, and Mozilla's RSS Editor. Speaking of Mozilla, their flagship Web browser, Firefox, can be turned into an RSS editor through the use of an add-on.

No matter which approach you want to take in creating an RSS feed for your own website, after you have uploaded the file to whatever remote server is hosting your website, be sure to include a link to it on your home page — otherwise the online world may never discover your personal news feed.

Copyright © 2009 Michael J. Ross. All rights reserved.
bad bots block