SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict fabrizio's Avatar
    Join Date
    Oct 2002
    Location
    California
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is RSS file name extension important?

    Hello here,
    I am working to implement syndication on my site as more efficiently as possible by implementing the RSS 2.0 protocol:

    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">

    and I was wondering if it is better to stick with .rss or .xml extensions for RSS files or any extension can work just fine? Or, also as I can see here on SitePoint, can I just point the RSS to a PHP script?

    In other words, are the following RSS calls all correct and safe for a RSS 2.0 feed?

    http://mysite.com/news.rss
    http://mysite.com/news.xml
    http://mysite.com/news.html
    http://mysite.com/news.php?id=1


    Thank you for any thoughts in advance!

    Best,
    Fab.
    Virtual Sheet Music®, Inc.
    http://www.virtualsheetmusic.com
    Musicians Page
    http://www.musicianspage.com

  2. #2
    SitePoint Guru
    Join Date
    Feb 2008
    Posts
    655
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any application that is going to parse the feed should not be checking the file extension.

    Whatever extension you call it should be fine, so long as it returns properly formatted XML.

    You have pretty much proved the point with the Sitepoint example.

  3. #3
    SitePoint Addict fabrizio's Avatar
    Join Date
    Oct 2002
    Location
    California
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much, I just needed a confirmation to my doubts

    Thanks!

    Best,
    Fab.
    Virtual Sheet Music®, Inc.
    http://www.virtualsheetmusic.com
    Musicians Page
    http://www.musicianspage.com

  4. #4
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    While I agree with the above the defacto standard for RSS since version 2.0 is the XML extension (as it is widely accepted within browsers, especially as RSS files are natively XML documents anyway). While .rss can still be used I would probably go with XML purely out of it being a more universally standardised format.

    PS: If you are trying to implement your syndication more effectively have you also considered adding an atom feed to your website? Atom is another syndication format which is as widely recognised as RSS (with additional useful elements). Generally people use both RSS and Atom so that the visitor can use their preference.

    Atom: http://www.atomenabled.org/developers/syndication/

  5. #5
    SitePoint Addict fabrizio's Avatar
    Join Date
    Oct 2002
    Location
    California
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Of course, I am considering Atom also. Thank you for your suggestions, I will take care of them. Really appreciated Alex!

    Best,
    Fabrizio
    Virtual Sheet Music®, Inc.
    http://www.virtualsheetmusic.com
    Musicians Page
    http://www.musicianspage.com

  6. #6
    SitePoint Enthusiast badams67's Avatar
    Join Date
    Apr 2009
    Location
    London
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The file extension will matter if your RSS file is static, since your web server, will use the
    extension to guess what mime-type to return, which should be "application/rss+xml". This come from a row in your servers mime-type file reading.

    application/rss+xml rss

    RSS Feeds are often generated automatically, and in that case the extension doesn't matter. And the mime-type line "application/rss+xml" in the HTTP header should be generated by the script.
    Feed Distiller Aggregating RSS feeds into topical feeds.

  7. #7
    SitePoint Addict fabrizio's Avatar
    Join Date
    Oct 2002
    Location
    California
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, that's my case: the rss is generated by a PHP script but I was able to use the .rss extension anyway. Here it is:

    http://www.virtualsheetmusic.com/news.rss


    Thank you!

    Best,
    Fab.
    Virtual Sheet Music®, Inc.
    http://www.virtualsheetmusic.com
    Musicians Page
    http://www.musicianspage.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •