Creating an RSS Feed for Your Website


The acronym RSS stands for "Really Simple Syndication". RSS is a format that enables you to easily distribute links to your website content by adding channel and item definitions to an XML (eXtensible Markup language) file on your webserver which can be read by RSS Reader software. Channel and item definitions consist of a title, description and URL.

RSS Reader Software



    RSS Reader Software

    • Windows - Sharpreader
    • Mac OS - NetNewsWire
    • Linux - Straw
    • Web Based - Bloglines
    If you add a webpage to your site about a particular topic, adding an "item" in your XML document will make this content available to anyone with access to RSS reader software. Items in an XML document are organized into "channels" which correspond to the major topics of a website. If your website was about "Dogs" for example, you may want to define a channel about "Dog Grooming" and another about "Dog Shows". As you add webpages to your site about these topics you would also add items to your XML document under the appropriate channels.

    Creating an RSS Feed

    Let's start with the simplest building block, an item, and work from there to define a complete XML document which we will use for our RSS feed.

    Using our "Dogs" website example from above let's assume we have just created a webpage on our site about "Dog Grooming Blades". To create an item in our XML document for this new webpage we need three pieces of information; the item title, item description and the item's webpage URL. It should be noted that you are free to choose whatever title and description you want to define an item but typically the values for the webpage title and meta description are used.

    • Title: Types of Grooming Blades
    • Description: Many pet owners are surprised to learn just how many different types and sizes of blades there are to choose from. Every blade has different specifications, characteristics and each produces different cuts. Blades are available from grooming suppliers .
    • Webpage URL: http://www.dogexample.com/grooming/grooming-blades.htm
    RSS makes use of an XML file to store items. Structures within these files are defined using XML tags.

    XML is a markup language for documents containing structured information.

    A markup language is a mechanism to identify structures in a document. The XML specification defines a standard way to add markup to documents.

    RSS has it's own special set of XML tags defined which allows any software which understands RSS to parse an XML document into a readable format for the software user.

    Defining Items in an XML File

    Using the information we have collected for our webpage about "Grooming Blades" we can now begin creating our XML document for this example. The syntax would have the following form:


    </strong>Types of Grooming Blades<strong>

    Many pet owners are surprised to learn just how many different types and sizes of blades there are to choose from. Every blade has different specifications, characteristics and each produces different cuts. Blades are available from grooming suppliers.

    http://www.dogexample.com/grooming/grooming-blades.htm

    ** If you are familiar with HTML coding the syntax for writing an XML document will not require a large learning curve to master. The tags used to define an RSS item in an XML file are similiar to standard HTML tags and follow the same basic rules that HTML does.

    Using our "Dogs" website example, if we add two more webpages to our site about "Dog Grooming" then we would have to add two more items to our XML document as well:


    </strong>Types of Grooming Blades<strong>

    Many pet owners are surprised to learn just how many different types and sizes of blades there are to choose from. Every blade has different specifications, characteristics and each produces different cuts. Blades are available from grooming suppliers.

    http://www.dogexample.com/grooming/grooming-blades.htm


    </strong>Grooming Basics<strong>

    Dog grooming can take on many forms. First, it is important tounderstand what you want from your dog grooming experience. Are you grooming for a dog show, or do you just want to make your dog look great while out for a walk.

    http://www.dogexample.com/grooming/grooming-basics.htm


    </strong>Grooming as a Career <strong>

    When taking your first steps in the dog grooming profession you should seek out an experienced mentor to help you through those difficult times at the beginning.

    http://www.dogexample.com/grooming/grooming-career.htm

    We would repeat this process until we have defined items in our XML document for all of the webpages on our site that are about "Dog Grooming".

    Organizing Items Using Channels

    Having an unordered list of items in your XML document may be fine for a personal or one-topic website, but what if you have a larger website with a number of different topics?

    Organization of items within an XML document is accomplished by defining channels which correspond to each major topic of your website. If you have a news website for example, you may want to define channels for; weather, sports and politics in your XML document.

    As with items, you are required to define a "channel title", "channel description" and a "channel URL" for each channel you add.

    Continuing with our "Dogs" website example from above, we would define a channel in our XML document for "Dog Grooming". Here is the information we have gathered for our proposed "Dog Grooming" channel:

    • Channel Title: Dog Grooming
    • Channel Description: All things a person would ever need to know about dog grooming.
    • Channel URL: http://www.dogexample/grooming/

    The channel definition in our XML document would have the following syntax:


    </strong>Dog Grooming<strong><title></strong><br></p><p><strong><description></strong>All things a person would ever need to know about dog grooming.<strong></description></strong><br></p><p><strong><link></strong>http://www.dogexample/grooming/<strong></link></strong><br></p><p><strong></channel></strong></p> </blockquote></p><p>Notice that the syntax to define an <strong>item</strong> or a <strong>channel</strong> in an XML document are virtually the same. To keep the definitions straight, it is best to think of <strong>channels</strong> as "<em>containers</em>" for similiarly themed <strong>items</strong>. A <strong>channel</strong> must have all <strong>items</strong> associated with it defined before it's closing <strong></channel></strong> tag within your XML document in order for it to work properly. Combining the <strong>channel</strong> and <strong>item</strong> definitions we have already created for our proposed "<em>Dog Grooming</em>" channel would produce the following XML document: </p></p><p><blockquote></p><p><strong><channel></strong></p></p><p><strong><title></strong>Dog Grooming<strong><title></strong><br /></p><p><strong><description></strong>All things a person would ever need to know about dog grooming.<strong></description></strong><br /></p><p><strong><link></strong>http://www.dogexample/grooming/<strong></link></strong></p></p><p><strong><item></strong><br /></p><p><strong><title></strong>Types of Grooming Blades<strong>

    Many pet owners are surprised to learn just how many different types and sizes of blades there are to choose from. Every blade has different specifications, characteristics and each produces different cuts. Blades are available from grooming suppliers.

    http://www.dogexample.com/grooming/grooming-blades.htm


    </strong>Grooming Basics<strong>

    Dog grooming can take on many forms. First, it is important tounderstand what you want from your dog grooming experience. Are you grooming for a dog show, or do you just want to make your dog look great while out for a walk.

    http://www.dogexample.com/grooming/grooming-basics.htm


    </strong>Grooming as a Career <strong>

    When taking your first steps in the dog grooming profession you should seek out an experienced mentor to help you through those difficult times at the beginning.

    http://www.dogexample.com/grooming/grooming-career.htm

    Notice that we opened the channel tag, defined it's title, description and link values, and then nested the item definitions within the channel structure before finally closing the channel tag. Adding the items between the opening and closing channel tags tells an RSS Reader that these items are associated with that channel.

    To finish our RSS feed we need to add tags to our XML document to define the RSS and XML versions that our XML file is compatible with. The current standard for XML is 1.0 at the time of publication.

    RSS Versions

    • RSS 0.91, 2.0 - Defined by Userland.com. v2.0 is the current standard and is backwards compatible to v0.91. RSS is much more widely used than Atom at the time this article was written.
    • Atom - Based on RSS 2.0 and used by some industry heavyweights such as Blogger.com. The Atom standard allows for the definition of more metadata field names than RSS. Both Atom and RSS use XML document formats but the feeds are not compatible with each other.

    Most RSS readers will support both RSS and Atom XML feedtypes but be sure to read the documentation for your chosen RSS software client if you have any compatibility questions.

    Using XML version 1.0 and RSS 2.0 comptibility our XML document would now look like:


    </strong>Dog Grooming<strong><title></strong><br /></p><p><strong><description></strong>All things a person would ever need to know about dog grooming.<strong></description></strong><br /></p><p><strong><link></strong>http://www.dogexample/grooming/<strong></link></strong></p></p><p><strong><item></strong><br /></p><p><strong><title></strong>Types of Grooming Blades<strong>

    Many career seekers and pet owners are surprised to learn just how many different types and sizes of blades there are to choose from. Every blade has different specifications, characteristics and each produces different cuts. Blades are available from grooming suppliers.

    http://www.dogexample.com/grooming/grooming-blades.htm


    </strong>Grooming Basics<strong>

    Dog grooming can take on many forms. First, it is important tounderstand what you want from your dog grooming experience. Are you grooming for a dog show, or do you just want to make your dog look great while out for a walk.

    http://www.dogexample.com/grooming/grooming-basics.htm


    </strong>Grooming as a Career <strong>

    When taking your first steps in the dog grooming profession you should seek out an experienced mentor to help you through those difficult times at the beginning.

    http://www.dogexample.com/grooming/grooming-career.htm

    We now have a fully functional XML document which defines our "Dog Grooming" channel complete with links to the items within this channel. To create a complete XML document for our "Dogs" website we would need to define channels and items for the rest of our website topics and webpages and add them to this XML document. After completing this process, we would then save this file as dogexample.xml (replace dogexample with your own appropriate filename) and upload it to our webserver in ASCII format.

    Validation

    After completing your XML document make sure there are no errors in your file before you provide your feed for syndication. Visit the XML validator provided by Feedvalidator.org and input the URL of your newly created XML file to be validated. Fix any problems identified by the validator service and get ready to begin the syndication process.

    Getting Syndicated

    You now have a validated XML document loaded on your webserver with links to all of your website content.

    So how do you go about actually getting your feed syndicated?

    The first step would be to provide a link to your new feed from your own website. If you use a template to manage your website content it is a good idea to add a link to your RSS feed to this template so that it will be available from all pages of your website.

    Using our Dogs example we would add the following link to our website template:

    http://www.dogexample.com/dogexample.xml

    Now anyone who visits our "Dogs" website can syndicate our content by pointing their RSS reader software to the address of the XML file on our server. Using javascript a webmaster could even parse the headlines from your XML file to display right on their website. If you updated your XML document, the headlines on their website would also change!

    There are also a number of websites on the internet where you can add your RSS feed for others to syndicate.

    Some RSS Syndication Services:

    • New Is Free
    • Technorati
    • Feedster
    • The Feed Directory

    XML as a Sitemap

    Creating an XML file to use as an RSS feed is also a great way to ensure that all of your website content gets indexed by the major search engines. Since your XML document is essentially a list of titles and URLs for your website documents it acts as a SiteMap for your website. Providing a link to your RSS feed from all pages of your website is the same as providing a link to a sitemap! Since the major search engines are able to parse XML you can be sure to have all of your webpages indexed regardless of the linking structure of your website.

    Having trouble getting those tier 3 webpages on your site indexed?

    Define an item in your XML document pointing to the trouble webpage and watch it get indexed.

    Google Site Maps

    Google has recently implemented the idea of Google Sitemaps which is essentially the same idea as setting up an RSS feed for your website. For more information on Google Sitemaps please visit the Google Sitemaps Homepage.

Close    To Top
  • Prev Article-Geek:
  • Next Article-Geek:
  • Now: Tutorial for Web and Software Design > Geek Articles > RSS > Geek Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction