Welcome to WebmasterWorld Guest from

Forum Moderators: bill & werty

Message Too Old, No Replies

Is your feed really valid?

only if it is defined as a application/rss+xml mime-type, it is.



1:07 am on Apr 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

The Feed Validator [feedvalidator.com] has just added a new specification:
Any .rss file, which is used as a feed, needs to be parsed as a "application/rss+xml" mime-type through the system, to be known as "fully" valid.

Without this, your RSS is of course, valid, but some systems/programs may have some problems:

This feed is valid, but may cause problems for some users. We recommend fixing these problems.

Feeds should not be served with the 'text/plain' media type [help [feedvalidator.org]]

To fix this, simply add the following code to your .htaccess file:

AddType application/rss+xml .rss


[edited by: Brett_Tabke at 1:29 am (utc) on April 15, 2004]
[edit reason] fixed link [/edit]


10:58 am on Apr 12, 2004 (gmt 0)

10+ Year Member

If you're generating your rss dynamically with PHP while using a shared hosting package you may be having difficulties fighting around configurations issues. PHP has a useful function which will help if you're forced to use a .php extension for your feed, which will in all likelihood serve it as plain text.

Add this as the first line of your script

header("Content-type: application/rss+xml");

(or /atom+xml, delete as appropriate) and it ought to pass the new validation requirements.


Visit Thailand

12:28 am on Apr 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

sid - thanks for that I was just about to post asking how to solve this problem that has been bugging me for a few days. Their FAQ should link to this thread!


2:50 am on Apr 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

As the great Andrew Martin [imdb.com] said, "One is glad to be of service." ;)


King of Bling

3:20 pm on Apr 14, 2004 (gmt 0)

10+ Year Member

Hey, I was just trying to figure that one out. Added your code - and whammo - validation!


Visit Thailand

12:36 am on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Unfortunately I still get the same message.

Do I have to add something to httpd?


1:21 am on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Visit_Thailand, you can try the following options:
  • Add the same .htaccess code given above, to your httpd.conf file.
  • Add the following code to your .htaccess file, modifying the bold/italics/red bit:
    <Files your-feed-name.rss>
    ForceType application/rss+xml

    the code above is more precise, and doesn't parse all the other rss files on your server but the one listed after <Files. I would recommend adding the AddType code first in your httpd.conf file, with this being an alternative.

    Good luck,

  • ronin

    11:41 pm on Apr 18, 2004 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member

    Hmmm... this .htaccess stuff - does this only apply to Apache Servers or to Windows Servers as well?

    Every time I've tried to create an .htaccess file in the past the windows server seems to have just stared at it blankly and walked on.


    3:31 pm on Apr 23, 2004 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member

    Quite frankly I don't understand anything about .htaccess or server side stuff.

    Can't I just define my RSS 2.0 document as application/rss+xml mime-type within the document itself?


    8:35 pm on Apr 26, 2004 (gmt 0)

    10+ Year Member

    is for apache server
    and hence for all unix, linux freebsd, etc server
    that make the vast majority of all heavy duty hosts on the web.

    the regular line added to have all .rss files served properly would be

    AddType application/rss+xml .rss
    LL files on your domain that are in the folder AND any of its SUB-folders of that .htaccess file.
    it is enough to put that line into the .htaccess of the ONE folder you store all .rss feeds since it normally never is used escept for .rss files and if applied system wide may delay apache server a little for each page call.

    if you have NO .htaccess file there ( and your site is running an apache server )
    then you may create a .htaccess file and upload it into the folder containing your .rss files

    use a regular unix editor on you linux system ( or whatever -ix system you have )
    an empty text file
    name .htaccess
    content on a single line
    AddType application/rss+xml .rss
    upload ftp in ASCII!
    chmod 664

    and that error message should disappear because it menat that your server did serve the rss files as text/html files due to missing above LINE in .htaccess OR apache httpd.conf

    by that additional line apache will handle the file differently when "serving" files with that extension .rss

    .htaccess usually can be created/configured by any site
    owner using a regular commercial domain host service.
    apache is looking by default in every folder for a .htaccess

    for any further problems or a full RSS howto for beginners you may want refer to



    10:28 pm on Apr 26, 2004 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member

    Okay, thanks for that, Hans.
    So what do you do istead of .htaccess if your server is a windows server?


    3:32 am on Apr 27, 2004 (gmt 0)

    10+ Year Member

    I just want to pop in to say that I used the method sidyadav recommended, adding the Force Type statement to my .htaccess file, and it worked perfectly.

    ronin, I remember reading somewhere--right after the validator got picky about mime-type--that there was a statement you could add as the first line of your feed that would correct the mime-type. Apparently, it would be interpreted as part of the header. I just cant't find it, though!

    Obviously, this is a problem for people on shared hosting, or who can't easliy re-configure their servers.


    5:17 pm on Apr 29, 2004 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member

    I'd love to hear it if you find it.
    I've run a couple of searches but no luck.


    5:33 pm on Apr 30, 2004 (gmt 0)

    10+ Year Member

    I output feeds with the "text/xml" mime-type.

    They are all based on the common XML format. Just imagine, all the thousands of different XML standards out there having individual mime-types.


    Featured Threads

    Hot Threads This Week

    Hot Threads This Month