Pages

My Blog Headlines

Sep 16, 2011

How to Create an RSS 2.0 Feed for Your Website

How to Create an RSS 2.0 Feed for Your Website Updates

If you can learn HTML, you can easily learn how to build your own RSS 2.0 feeds. I'll take you through the steps to creating an RSS feed from scratch.

Step 1: XML Declaration : 
  • Since RSS 2.0 must validate as XML, the first line in your rss feed must be the XML declaration.
    • <?xml version="1.0" encoding="utf-8"?>
  • The encoding is optional but recommended. If your using something other than UTF-8 be sure to change the above line.
    • Note: If you are using CFML and have whitespace due to the Application.cfm file you can reset the output buffer using <cfcontent reset="true">
Step 2: RSS Channel : 
  • In this step we need to open up the rss tag, and the channel tag, all of your feed content goes inside these tags.
    • <rss version="2.0">
    • <channel>
Step 3: RSS Feed Information :
  • Next you place information about your RSS feed such as the title of it, the description, and a link to the the site.
    • <title>The title of my RSS 2.0 Feed</title>
    • <link>http://www.example.com/</link>
    • <description>This is my rss 2 feed description</description>
    • <lastBuildDate>Mon, 12 Sep 2005 18:37:00 GMT</lastBuildDate>
    • <language>en-us</language>
The lastBuildDate should be the date and time that the feed was last changed. Dates in RSS feeds should comply to RFC 822. In CFML the DateFormat mask would be ddd, dd mmm yyyy and the TimeFormat would be HH:mm:ss. Dates should be offset to GMT. The lastBuildDate tag is not required but is highly recommended.

Step 4: RSS Items : 
  • Next we enumerate over each RSS item, each item has a title, link, and description, publication date, and guid.
    • <item>
    • <title>Title of an item</title>
    • <link>http://example.com/item/123</link>
    • <guid>http://example.com/item/123</guid>
    • <pubDate>Mon, 12 Sep 2005 18:37:00 GMT</pubDate>
    • <description>[CDATA[ This is the description. ]]</description>
    • </item>
    • <!-- put more items here -->
Make sure you escape any characters that might cause your XML to invalidate, these characters include <, >, & - I like to enclose any content that may contain HTML inside a CDATA section.
Note: In CFML you can use the XmlFormat function to escape special characters in XML.

Step 5: Close Channel and RSS tags. : 
    • </channel>
    • </rss>
Step 6: Validate your feed : Validate your feed using FeedValidator.org.

Note :  You can use various Feed burner\s to test your feeds are working correctly or not : 
Other things to get more information about RRS feeds : 

Encoding - You should include the encoding in your Content-Type HTTP header, and in the XML declaration.
Styling - If you want to make your RSS feed look a little nicer you can CSS stylesheet for your RSS feed.
Categories - It's a good idea to include category tags in your RSS feeds as well, these go inside the item tag. You can give an item multiple categories by adding a tag for each one.
Above are the basic information by which you can create rss feed for your website, You can go and Check the RSS 2.0 Specifications for more info.
Thank You Very Much fro Reading the Post.

22 comments:

  1. Small internet business marketing Professional is a marketing consultancy serving business owners in London and UK wide with strategic solutions.

    ReplyDelete
  2. Thanks for this great post, I was looking for the same topic since a long time. Its become very easy for me now how to create Rss for my website. Thanks for your effort, Thumbs up for you.

    Website Design for Doctors In Low Cost By NovaMedMarket Firm in Faifax VA, Washington DC and Maryland. If you are looking for affordable web design firm for your business just click on the link above.

    ReplyDelete
  3. Thanks for the post and great tips.. even I also think that hard work is the most important area of getting success.
    online marketing company

    ReplyDelete
  4. I am truly pleased to read this website posts which carries lots of helpful data, thanks for providing these kinds of statistics.

    Dr. Rahool Patel has been practicing dentistry in the East Windsor Family Dentist, NJ 08520 and surrounding areas for years.Call there office at (609) 448-3448 to make an appointment today!
    -Visit there Website Now!

    ReplyDelete
  5. Strangely enough, most people actually fail in their Internet marketing strategies not because they lack the knowledge or the technical capabilities to make good use of Internet Marketing.
    Consultant Master Academy

    ReplyDelete
  6. you possess a great blog here! want to develop invite posts on my blog? digital marketing agency singapore

    ReplyDelete
  7. Think about some effective promotions and advertisement which include for Energizer batteries and others.increase web traffic

    ReplyDelete
  8. Hello just wanted to give you a quick heads up. The words in your article seem to be running off the screen in Opera. I’m not sure if this is a formatting issue or something to do with browser compatibility but I figured I’d post to let you know. The design and style look great though! Hope you get the issue resolved soon. Cheers www.dynamicmarketing.sg

    ReplyDelete
  9. Thanks a lot for writing your opinions. Being author, I am constantly on the lookout for unique and different solutions to think about a matter. I find fantastic motivation in doing this. Thanks jvzoo review and bonuses

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. Things like just go through $250 every month or $8.30 per day, just demonstrate my advertisements to individuals looking for these accurate terms and just demonstrate my promotions to individuals inside a ten mile sweep of Cookeville, Crossville and Smithville. You have unlimited oversight over your advertising. absolutclick

    ReplyDelete
  12. very nice post, i definitely enjoy this amazing site, persist in it seo marketing

    ReplyDelete
  13. Interesting article. Thank You for sharing.

    ReplyDelete
  14. Hairsplitting can be a colossal hindrance in the quick paced universe of the Internet. Webdesigner

    ReplyDelete
  15. What an amazing article is this. thanks for this, I really appreciate you. If you are interested in neo and gas wallets, please visit our websites to get full information about official neo wallets.

    ReplyDelete
  16. Thank you for taking the time to post this blog. I am pleased with your work after reading this post. This is very useful for us. Keep sharing such blogs. fastest smm panel

    ReplyDelete
  17. What is SMM How can I get an SMM panel?

    We can get its panel by following these steps:
    Purchasing a Brandable Domain Name.
    Getting the right hosting for this SMM Business.
    Purchasing the perfect SMM Script.
    Installing and setting up the script.
    Promoting it and Making Money.

    Click Here

    ReplyDelete
  18. A person necessarily assist to make seriously articles I’d state.
    That is the first time I frequented your web page and thus far?

    my web page; ** 풀싸롱
    (jk)

    ReplyDelete