What IS an RSS Feed? How do I Make One?
An RSS Feed is a "list" of items/content recently added to your website. It includes a heading and short description of each item, and a link to a "more info" page on your site. This article describes how feeds can be made using a text editor.
RSS_Business_003.html It is going to get a bit technical here... Because RSS feeds use XML code, which is a bit like HTML but not so forgiving... you really have to be careful.
Note: You could also download software or use web based services to build your RSS feed. Those options are not discussed in this article.
Creating a Feed
- Using any text editor, or word processor, create a new text file and save it as "feed.xml". Note : it MUST be saved as text for this to work.
- Now, on the very first line of your new document, type:
<rss version="2.0">
That tells anybody (or any thing - software) that looks at your feed, what format it is in.
- Each feed must supply some general information about the feed in the "channel" section, so on the next line, type:
<channel>
and then enter the following information (one on each line):
<title>A Name for Your Feed</title> <description>A Short Description of Your Feed</description> <link>http://www.yourdomain.com</link>
(The link should point to either your home page, or another special page on your site.)
- Now, you are ready to add some items to your feed with the most recent items showing first.
Start each item with:
<item>
and add the following information for each item:
<title>A Title/Headline for The Item</title> <description>A Short Description of the Item</description> <link>http://www.yourdomain.com/link.html</link>
(The link goes to the page which contains the full details about the item.)
Now... finish each item with:
</item>
and save your file after you add each item.
- Repeat the previous step for each item you want to add to your feed, adding items one at a time, with the newset items at the top. Look to keep around 15-20 items in your feed, removing the older, outdated ones from the bottom of the list.
Note - you can have more items in your RSS feed if you want... You could have up to 50 (or even 100 if you really wanted to). Just remember that the vast majority of feed reader software will NOT display all of the items. Most of them may only show just the first 5 or 10.
- To finish your feed, add the following two lines at the bottom:
</channel> </rss>
and then save your file.
- Your final feed should look something like this...
<rss version="2.0"> <channel> <title>RSS is King RSS News Feed</title> <description>For the latest information from RSS is King</description> <link>http://www.rssisking.com</link>
<item> <title>Latest News Item Headline</title> <description>Here is where the actual introductory paragraph to the news item will be displayed.</description> <link>http://www.rssisking.com/news/link1.html</link> </item>
<item> <title>Another News Item Headline</title> <description>And this is the lead in paragraph for the next news item</description> <link>http://www.rssisking.com/news/link2.html</link> </item>
</channel> </rss>
Click to validate our test feed above
- And now for the tricky bit... An RSS feed is an XML file, and some characters are just not allowed in XML.
Here is a list of illegal characters you MUST change or else your feed may not validate:
It's best to avoid SPACES in URL's. If you must have them, use %20 & - change ampersands to & " - change double quotes to " ' - change single quotes/apostrophes to ' > - change greater than symbols in your text (NOT THE TAGS) to > < - change less than symbols in your text (NOT THE TAGS) to <
- Now, it's time to transfer your feed to your web server. It is simplest to place your feed.xml file (or whatever you called it) in the same directory as your home page.
- Just to make sure you did it right... now is the time to validate your feed. Enter your feed URL - which will be something like:
http://www.domainname.com/feed.xml into the field at feedvalidator.org to see it it is all OK. Take note of any errors that are reported and see if you can fix them in your file, upload and test again.
- If everything validates OK, then you are ready to advertise your feed. The simplest way to do this is to add a link to your feed from your home page.
Copy either of these images - or - and upload it to your web server. Then place the image, with a link to your feed, on your home page. Example link: <a href="http://www.mydomain.com/feed.xml"><img src="images/firefox-rss.png" width=15 height=15 alt="RSS feed for this site" border=0> My RSS Feed</a>
Next, submit your feed to various aggregators. Check on RSSisKING.com for a full list of aggregators you can use. And that's it. You've built a very basic, but functional, RSS feed, put it on your web site, and got the word out about it! There are ways of extending your RSS feed with additional <tags> but we'll leave that for another day...
REMEMBER
All you need do now is get into the habit of updating your feed at least weekly otherwise your feed subscribers will very quickly drop you off their list.
|