How to Create an RSS Feed for your Website, Easy and Quick.
Part of the
You Can Learn C#
series.
By
Ken Brown
Editor,
YouCanLearnSeries.com
Updated:
November 24, 2004
Over a year and a half ago, I attended a Chicago .Net Users Group meeting in Downers Grove, Illinois. The discussion topic for the meeting was
RSS feeds
.
I must admit I was only listening partially, because I didn't think I needed or wanted an RSS feed. I definitely didn't know what they were and after the discussion I thought they were hard to implement. Quite frankly, I was wrong on all counts.
What is an RSS feed
? I have read many different words for the acronym, but for now let's go with Really Simple Syndication. Those big words alone make you feel like this process isn't for the little guy. But, despite the word syndication, you can start today to add an RSS feed to your web site, no matter how big or small your site.
An RSS feed is nothing more than an XML file that contains information about your web site. You can change the information on a regular basis and people who subscribe to your RSS feed will be notified of the change and will go to your site to get more information.
RSS is pull technology
instead of push technology. What does that mean? When you send a newsletter to someone you are pushing that newsletter into their email account. Even if they have subscribed to your newsletter they may not really want it. But you still push it to them every week or so. Pull technology, means that your subscriber goes and gets the information when they want it. The subscriber has to make an effort to ask for your new content.
At first you might think nobody will ever ask for new content from you. But it isn't that difficult. See there are RSS readers available for free. These readers use a timer and every time the timer goes off, the RSS reader will check to see which sites the user subscribes to. Then they go and get the information from those sites and present the information in an easy to read format.
Your RSS subscriber now has a synopsis of your new content. If they find the synopsis interesting, then the next step is to click on the link provided to take them to your website where they can read the entire article or get new information.
It is very similar to sitting down in a doctor's office and picking up a magazine. The first thing most people do is read the cover to see if there are any interesting articles. Then they find the page number of the article and go and read the article.
I already have a newsletter, why bother with an RSS feed?
You might say, "That is the same thing my newsletter does. I already have a newsletter, why bother with an RSS feed?" Because some people,
a lot of people actually, don't want you to have their email address
. I read an article in November 2004 that said the impact of newsletters is diminishing.
Just because you have an RSS feed doesn't mean you get rid of your newsletter. Just because you have a newsletter, you don't eliminate your RSS feed. They should work together to drive more traffic of interested users and potential clients.
"But you used the term XML, I started to learn that and it didn't make sense to me so I just gave up on it." Wait, didn't I say it was easy? Yes. Easy. Just follow these easy steps.
First, I have created an
RSS feed XML file
that contains everything you need to make it an RSS feed. When you click on the link your browser will format the xml into a human readable format. I am assuming you currently are not running an RSS feed reader, otherwise you just subscribed to this RSS feed.
The XML starts out with
<rss version="2.0">
. This tells the RSS readers how to interpret what follows by giving the reader the rss version to be read. The next element is the
<channel>
. This begins the portion to be interpreted. The first portion will describe the title, homepage link, the language and the last build date. It is pretty easy to identify those aspects. The language is standard language info and the "en-us" represents an English speaking country with a United States dialect.
The
<lastbuilddate>
tells the readers when you last added new content. This way the reader can choose to stop at this point if you haven't added anything new to your RSS feed.
The next element is the
<item>
element. You see that the item element is repeated multiple times with a beginning tag and an ending tag for each repeat. The item tags wrap around each tidbit of new information you want to share with your readers. Within each item tag can be found a
title tag, link and description tags
.
The title tag will contain a brief title of what this new content contains. Make it an eye grabbing headline that will draw your readers to click on the link tag to take them to the page that contains this content.
The description tag allows you more room to sell your article to the potential reader. Like a good news story or mystery novel, use this paragraph to grab the readers attention and make them yearn to finish the article. Normally this can be the first paragraph of an article or maybe spice it up with just enough information to tease but not enough to say, I already know this.
Isn't your newsletter similar to this already? You mention the new articles on your web site and then sell the articles with a little blurb explaining what the article is about and how it will help the reader solve a problem, save money or help them create something new.
Then complete the RSS feed with a closing channel tag and a closing rss tag and you're done. Yes it really is that easy. Put an image button on your web page and link it with the rss feed XML file and you are finished.
So to start your own RSS feed, do a CTRL-A on the xml file. Then do a CTRl-C and then open notepad or your favorite XML editor tool. CTRL-V pastes the XML into your XML editor. Get rid of the leading "-" (dashes). Then change the important info to reflect what is important on your site. Be sure to remember to change the last build date. Save the file as "RSSFEED.XML" and you're ready to go.
Provide a link to this file either as an image button or a link and put it on your website. Now, you are ready to allow your customers to pull information down from your site when they want it with your very own
RSS feed
.
<rss>
Header tag
Required
<channel>
Channel Tag describes specific information about the company providing the RSS feed.
Required
<title>
Embedded within the
channel
tag, provides reader with the title of your article.
Required
<link>
Embedded within the
channel
tag, provides reader the ability to reach your home page.
Required
<Description>
Embedded within the
channel
tag.
Required
<language>
Embedded within the
channel
tag, provides reader information to assess what language you are using.
Required
<lastBuildDate>
Embedded within the
channel
tag, tells reader when you added new content to your RSS feed.
Optional
<copyright>
Embedded within the
channel
tag, tells reader your copyright information.
Optional
<skipHours>
Embedded within the
channel
tag, tells reader when not to read your feed. When readers read your feed they eat up bandwidth, this saves you bandwidth, by telling reader not to bother asking during this time because you haven't added new content. (Sleeping maybe?)
Optional
<managingEditor>
Embedded within the
channel
tag, tells reader who is the managing editor of your news feed.
Optional
<webMaster>
Embedded within the
channel
tag, tells reader your web master information.
Optional
<ttl>
Embedded within the
channel
tag, tells reader how often to return to check for new information. Expressed in hours.
Optional
<item>
Embedded within the
channel
tag, This tag may be repeated multiple times expressing the different news worthy items of your content.
Required
<title>
Embedded within the
item
tag, gives reader the title of this one article.
Required
<link>
Embedded within the
item
tag, gives reader the link that takes user to this specific article.
Required
<description>
Embedded within the
item
tag, gives reader the description of this one article. Use this space to sell person reading the feed to click on the accompanying link.
Required
<pubDate>
Embedded within the
item
tag, gives reader the publication date of this specific article. I recommend you add this to all your feeds.
Optional
<guid>
Embedded within the
item
tag, gives reader the global unique identifier for this article. A repeat of the link tag.
Optional
Home
|
About Us
|
NewsLetters
|
Links
|
Contact Us
|
Copyright © 2004-2006 You Can Learn Series
Hosted Exchange
Reduce Costs; Improve Uptime with Hosted Email
Sacramento Computer Support
Computer and Technical Support
Durham Tree Service
Get Durham Tree Service to Make Your Yard Look Better
You Can Learn Series
Home
Web Directory
About Us
Contact Us
Site Map
Privacy Policy
Terms of Use
C# and ASP.Net
SQL
Landscaping
WeightLifting
Blog
GoodHealth
Travel
Web Business
Services
Store
C# and ASP.Net
Client Side Code
Client Side State Management
Create A Class
Use A Class
Create a Solution
Create a Project
Create an RSS Feed
ListItemCollection
Set Events ASP.Net
Set Events C#
Session State
SortedList Object
StyleSheet Tricks
Using Methods
Pass Objects to Methods
Pass Objects from Methods
View State
What is LDAP
Build an LDAP Reader
LDAP To Web Service
Question of the Day
SQL
Landscape Tips
WeightLift Tips
Blog
Good Health Tips
Newsletters
Travel
Web Business Tips
Services
Merchandise
Coupons
Tree Tree Designs
Sunset Midwestern Landscaping Book
Newsletter Signups
You Can Learn Series