Brian Gongol
What is an RSS Feed?
An RSS feed is a simple method of distributing information about updates to a website through the use of a small text file. People are learning how to read RSS feeds using a variety of tools, including the "Live Bookmarks" feature in Firefox, the tools available through services like My Yahoo and Bloglines, and e-mail readers.
What are the Benefits to Providing an RSS Feed?
In short, a well-managed RSS feed is an efficient way of driving lots of regular traffic to a website. RSS allows the visitor to make note of interesting websites and receive regular notice when those interesting sites are updated. Instead of sitting stagnant like ordinary bookmarks or being forgotten like most websites, sites with RSS feeds actively deliver notice of their updates to the people most interested in seeing them.
How to Set Up an RSS Feed
First, create a suitable location on your website where you can quickly locate the file. If you will be updating the RSS feed by hand, the more logical the route to the location, the better. In most cases, the smartest way is to create a directory named "rss". As a result, you should have a directory that looks like this:
Next, open Notepad and save a file named "index.xml". Use "Save As..." (not just "Save") and change the "Save as type" to "All files."http://www.YOURDOMAINNAME.com/rss/
At the top of the file, you'll need to include some basic information about the feed itself. Copy and paste the following at the top:
Keep the spacing exactly as shown. After that basic info, you'll need to identify some things about the feed itself. Enter the following:<?xml version="1.0" ?> <rss version="2.0">
Here's what those do:<channel> <title>ENTER THE NAME OF YOUR FEED HERE</title> <language>en-us</language> <link>ENTER YOUR URL HERE</link> <description>ENTER A BRIEF DESCRIPTION OF YOUR SITE HERE</description>
- Title should be the name of the feed (usually your domain name, your name, or the name of your company or organization).
- Language ("en-us") identifies the feed as one written in American English.
- Link identifies the URL supplying the feed (in other words, your homepage).
- Description tells the subscribers what the website and the feed are all about.
Here's what those do:<item> <title>ENTER THE TITLE OF YOUR UPDATE</title> <pubDate>ENTER THE DATE OF THE UPDATE IN THIS FORMAT: Tue, 11 Apr 2006 00:01:10 CDT</pubDate> <link>ENTER THE LOCATION OF THE UPDATE</link> <description>ENTER A DESCRIPTION OF THE UPDATE</description> </item>
- Item tags are used to identify the start and finish of each update.
- Title tells the reader the name of the update -- usually the name of the page or article that's been added.
- PubDate identifies when the update was added. If the format shown doesn't make enough sense, see the date/time specifications
- Link gives the URL of the page or article that has been added
- Description is where you describe the update. There's no consensus on the use of this section: Some people think it's best to copy and paste the entire update. Others (this author included) think it's best to summarize the update in a couple of lines, allowing readers to click through the link to read the rest.
Create a new Item for every update you add to the page. In general, it's recommended to keep the total number of items under 15.
At the end of the file, enter the following:
Save the file again and upload it to the directory you created at the beginning.</channel> </rss>
When you're done, the file should look like this:
Of course, you may have many items, and everything in CAPS should be replaced with your own information. Finally, you'll need to add the following information to the top of your homepage:<?xml version="1.0" ?> <rss version="2.0"> <channel> <title>ENTER THE NAME OF YOUR FEED HERE</title> <language>en-us</language> <link>ENTER YOUR URL HERE</link> <description>ENTER A BRIEF DESCRIPTION OF YOUR SITE HERE</description> <item> <title>ENTER THE TITLE OF YOUR UPDATE</title> <pubDate>ENTER THE DATE OF THE UPDATE IN THIS FORMAT: Tue, 11 Apr 2006 00:01:10 CDT</pubDate> <link>ENTER THE LOCATION OF THE UPDATE</link> <description>ENTER A DESCRIPTION OF THE UPDATE</description> </item> </channel> </rss>
This should be located between the<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.YOURDOMAINNAME.com/rss/index.xml">
<head>and
</head>tags. With these tags, your site will tell RSS-enabled browsers (like Firefox) that your site has an RSS feed. Ideally, you will add the above code to every page on your site, but if it appears nowhere else, be sure it shows up on the homepage. Additionally, you should add some sort of visible link to your RSS feed somewhere on the page.
This guide is intended as a simple primer for creating a basic RSS feed. For more details, see the RSS Specifications at Harvard University.