Title: Feed won&#039;t validate &#8211; XML Code Duplicated
Last modified: August 30, 2016

---

# Feed won't validate – XML Code Duplicated

 *  [olicutmore](https://wordpress.org/support/users/olicutmore/)
 * (@olicutmore)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/)
 * Hi guys
    My feed won’t validate. When I look at the error it says ‘XML parsing
   error: <unknown>:69:0: junk after document element’.
 * Line 69 and below is an exact duplicate of the first 68 lines, including the 
   XML declaration.
    Am I able to edit the file and delete the duplicated code? 
   Many thanks Oli
 * [https://wordpress.org/plugins/powerpress/](https://wordpress.org/plugins/powerpress/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/page/2/?output_format=md)

 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201809)
 * Can you reply with the link to the feed? If we can see it we can view the source
   of the feed which is the next step in giving you an answer.
 *  Thread Starter [olicutmore](https://wordpress.org/support/users/olicutmore/)
 * (@olicutmore)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201813)
 * [http://keyflowfeeds.com/feed/podcast/](http://keyflowfeeds.com/feed/podcast/)
   
   Thanks Angelo.
 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201826)
 * First, something is making a RSS feed in your feed twice. It’s bizarre. I see
   though is the first feed has “Super Premium Horse Feeds” in it, while the second
   one does not. You can see this yourself, view the feed in Firefox, then right
   click and select the option “view source”. You should only have one <xml> tag
   near the top and one </xml> near the bottom, you should not see multiple opening
   and closing xml tags.
 * Are you using a membership plugin or something to protect your web site for members
   only?
 * One other thing I see is a caching plugin adding HTML comments at the very bottom
   of the feed. This will cause problems with Apple.
 * `<!-- Quick Cache is NOT caching this page, because`$_SERVER[‘REQUEST_URI’]`indicates
   this is a`/feed`; and the configuration of this site says not to cache XML-based
   feeds. -->`
 * Perhaps there is a way to disable commenting from your WP caching plugin?
 * If you find a good web host, you will not need a WP caching plugin. If your on
   cheap web hosting, then the caching plugin is your only option. I would recommend
   at that point the Caching plugin WordPress.com maintains, I think it’s the [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
   one. PowerPress has logic to prevent WP Super Cache from adding those comments
   at the bottom.
 * What I recommend is using our diagnostic steps, basically disable all your plugins
   one by one until you get a valid feed, then you know what is causing the problem.
   [http://create.blubrry.com/resources/powerpress/using-powerpress/diagnosing-feed-andor-player-issues-with-powerpress/](http://create.blubrry.com/resources/powerpress/using-powerpress/diagnosing-feed-andor-player-issues-with-powerpress/).
 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201829)
 * I also suspect you do have caching happening from your web host, because slightly
   changing you rfeed URL from
 * [http://keyflowfeeds.com/feed/podcast/](http://keyflowfeeds.com/feed/podcast/)
 * to [http://keyflowfeeds.com/feed/podcast/?this=that](http://keyflowfeeds.com/feed/podcast/?this=that)
   shows a nice clean feed the way it should be. The random URL I just made is valid
   by the way, but still has the HTML comment at the bottom which will still be 
   an iTunes issue.
 *  Thread Starter [olicutmore](https://wordpress.org/support/users/olicutmore/)
 * (@olicutmore)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201835)
 * Cheers Angelo,
    Do have a membership plugin but I have already tried following
   the steps you linked. I deactivated all plugins except PowerPress and still no
   change. Where did you get the second feed from? Will I be able to use that with
   iTunes? Thanks Oli
 *  Thread Starter [olicutmore](https://wordpress.org/support/users/olicutmore/)
 * (@olicutmore)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201841)
 * Could it possibly be where I’ve tried setting it up previously and the file was
   cached with the caching plugin? And now I’ve tried it again, it is showing both
   the old and the new?
    Oli
 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201852)
 * If you disabled your caching plugin then I should not see the following at the
   bottom of the feed, yet I still do:
 * <!– Quick Cache is NOT caching this page, because `$_SERVER['REQUEST_URI']` indicates
   this is a `/feed`; and the configuration of this site says not to cache XML-based
   feeds. –>
 * The URL I used is a “hack” sort of speak, all I did was pass in additional parameters
   to the URL in the form of a GET query string, what many web sites use for search
   URLs. This almost always bypasses any caching and goes straight to the site. 
   Use for testing is ok, but I would not use that random URL I created for production
   use as it will not be cached, which caching is something you will want if it 
   is needed down the road.
 * Make sure you keep the caching plugin disabled. Also double check it did not 
   modify your .htaccess file, if it did it may still be working even if it’s disabled.
 *  Thread Starter [olicutmore](https://wordpress.org/support/users/olicutmore/)
 * (@olicutmore)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201859)
 * I have now disabled and deactivated Quick Cache. The message still appears when
   I try and validate the feed.
 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201862)
 * Sorry if I sound like a broken record, or perhaps some of the details I reply
   with you are missing, but we’re steps away from figuring this out so please be
   patient and read everything, I will post separate replies from now on so you 
   can think of these as steps…
 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201863)
 * We’ve established caching plugin is off. The URL still has the caching plugins’
   comment at the bottom.
 * MAKE SURE THE CACHING PLUGIN DID NOT MODIFY YOUR .htaccess FILE.
 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201865)
 * I’ve confirmed that your WP caching plugin is no longer enabled by trying another
   URL with a different query string (I’ve explained above what this is but I can
   again in a separate reply if it makes things more clear). [http://keyflowfeeds.com/feed/podcast/?random-string=124](http://keyflowfeeds.com/feed/podcast/?random-string=124)(
   no comment at bottom of feed, and this feed URL is valid).
 * This means something is still providing a cached version of the original feed,
   either something remains in the .htacces file or your web host is also providing
   caching and you need to clear that as well.
 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201868)
 * If your .htaccess file was not modified by the caching plugin, then this is telling
   me that your web hosting company is also performing caching. This is good, this
   means you absolutely do not need or want to be using a WordPress caching plugin.
   The bad news is, you may need to contact your web host to clear this cache if
   they do not offer a way to clear it in your web hosting control panel.
 *  Thread Starter [olicutmore](https://wordpress.org/support/users/olicutmore/)
 * (@olicutmore)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201870)
 * Okay thanks.
    I’m not sure where to find this file? Will it be where my files
   are hosted?
 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201893)
 * I just got back to a computer (was mobile previously). I took a look at the site,
   they are using a web server called Varnish. It will cache the page for a set 
   time. It has a mechanism to remotely clear the cache if it is setup. you will
   need to contact your web host to find out how to clear it if it is not obvious.
   A well configured Varnish web site does not require WP caching plugins.
 * With this knowledge, I don’t believe the .htaccess file is causing you any issues,
   but it could. One test is to go to WordPress settings > Permalinks and click 
   save once. It will overwrite the .htaccess file or tell you an error (in theory
   anyway) if it cannot overwrite the .htaccess file.
 * If after you clear Varnish and you still have this problem, the last place to
   look is the .htaccess file.
 *  Thread Starter [olicutmore](https://wordpress.org/support/users/olicutmore/)
 * (@olicutmore)
 * [11 years ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/#post-6201895)
 * Thank you so much for your help, Angelo.
    I will try these things and hopefully
   it will solve the problem. I will let you know if I get it working. Many thanks
   Oli

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/page/2/?output_format=md)

The topic ‘Feed won't validate – XML Code Duplicated’ is closed to new replies.

 * ![](https://ps.w.org/powerpress/assets/icon.svg?rev=2849869)
 * [PowerPress Podcasting plugin by Blubrry](https://wordpress.org/plugins/powerpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/powerpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/powerpress/)
 * [Active Topics](https://wordpress.org/support/plugin/powerpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/powerpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/powerpress/reviews/)

## Tags

 * [after](https://wordpress.org/support/topic-tag/after/)
 * [declaration](https://wordpress.org/support/topic-tag/declaration/)
 * [duplicated](https://wordpress.org/support/topic-tag/duplicated/)
 * [element](https://wordpress.org/support/topic-tag/element/)
 * [junk](https://wordpress.org/support/topic-tag/junk/)
 * [xml](https://wordpress.org/support/topic-tag/xml/)

 * 16 replies
 * 2 participants
 * Last reply from: [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * Last activity: [10 years, 12 months ago](https://wordpress.org/support/topic/feed-wont-validate-xml-code-duplicated/page/2/#post-6202120)
 * Status: not resolved