Support » Fixing WordPress » RSS 2.0 Feeds not validating because of a blank line

  • My WordPress RSS 2.0 feeds are not validating, in certain instances, because of a spurious blank line that appears at the top of the feed. The extra blank line ONLY appears when the url ends with a trailing slash. For example:

    With permalinks turned on, the url generated by the bloginfo(‘rss2_url’); function always ends with a trailing slash, so the feed does not validate. I just can’t figure out which modules are being called that could possibly be adding a blank line. I tried disabling the usual suspects (plugins, themes, etc.), but that blank line always shows up. I have peeked at all the modules that should be loading, but nothing obvious can be found. I’ve looked through the .htaccess file generated by WordPress, but I can’t find anything out of place there, either.

    Can someone tell me what the difference is between a WordPress url with a trailing slash and a WordPress url without a trailing slash? What extra redirect module is called in one case vs. another?

Viewing 11 replies - 1 through 11 (of 11 total)
  • This is not a feed problem, or a problem with a trailing slash in your urls. If you look at the source of your blog’s home page through your browser, you’ll find the same initial blank line at the top.

    Something in WordPress–possibly a plugin, though it could be any edited file–is causing the extra line to appear. The culprit behind this is often an extraneous line appearing in the code of a PHP file, meaning an empty line before the initial <?php or after the final ?>.

    The thing is this: with a trailing slash I get a blank line. Without the trailing slash I don’t get the blank line. Of course it’s not the slash causing the problem, but the pages are processed differently when the slash is part of the url. Some page is being called when there IS a slash that is NOT being called when there ISN’T a slash. It’s not a plugin because when I disabled them I had the same results. It’s pretty much a straight build, so I don’t believe there are stray linefeeds that have been added after the install. This seems to be a common problem with WordPress that defies a simple explaination. So … where’s that line coming from, anyway?

    Moderator James Huff


    Volunteer Moderator 🚀

    There is a blank line either at the beginning or the end of one of your WordPress files. Please do not assume that there are none. We are trying to help you. Please make an attempt to investigate all of your WordPress files. You are correct that this is an odd error that happens quite frequently, but there has always been one solution. One of your WordPress files has an extra blank line either at the beginning or the end of the file.

    Moderator James Huff


    Volunteer Moderator 🚀

    More inf0:

    Neither nor validate. There is a blankline at the top of each feed. The same is true if you view the source of your site. There is a blank line at the top of both and . Again, one of your WordPress files has an extra blank line either at the beginning or the end of the file. There is no way to discover which file this is. You will have to make the effort to investigate all of your WordPress files.


    If this is a thread hijack, please advise and I’ll make a seperate post. From reading the above, may I assume that this is the same problem that I’m having? See:

    Are there some places that I can check. I have disabled all of my plugins to no avail. The only file that I’ve messed-with is my sidebar on the blog.

    Chris addresses your issue and possible causes. Whitespace in the wp-blog-header.php caused this problem for one person, could be a bad version of that file out there.

    Thanks, Tom. I edited out all of the whitespace in the wp-blog-header.php to no avail. Still looking…

    Refresh your browser. Your feed is working fine for me now.

    Hi Tom… I found the bad plugin: PhotoPress. I cleared the whitespace and my aggregator feeds my site. Yet, when I try to see my feeds in Firefox, they still come back as bad.

    Feedvalidator now sees them as good… What gives?

    I’m seeing this URL – – just fine with Firefox.

    I was able to add the feed to My Yahoo without any problems, too.

    Try clearing your browser cache and cookies, shutting down Firefox and restarting it?

    Hi Tom,

    You’re the man. I cleared the cache and cookies; all works well. It’s always the simple things that are overlooked when I troubleshoot.

    Thanks again for all of your help.


Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘RSS 2.0 Feeds not validating because of a blank line’ is closed to new replies.