Support » Fixing WordPress » RSS Feeds from same parent domain not loading

  • * I have a main WordPress homepage
    * A separate multisite install for sub blogs
    * A separate site that has a combined RSS feed taken from the sub blogs
    * All sites use the same main domain, but run under separate sub domains, e.g.

    * For both of the WordPress sites I use a adapted version of the twentyten theme

    On the latest posts page I display two RSS feeds next to the main content, these are pulled from two of the sub-blogs via the built-in RSS Widget.

    Since both have been upgrade to 3.5.2 the RSS Widget will no longer show feeds from the sub blogs, I get this error:

    “RSS Error: WP HTTP Error: A valid URL was not provided.”

    The feeds validate on the w3c test page

    I also have a newsticker plugin that pulls content from the address, and this also does not show anything now.

    Since 3.5.2 contains a lot of fixes for cross site scripting, I am wondering if any of these fixes would stop the pulling of RSS content from sites that use the same parent domain?

    Both the widget and the plugin can load third party RSS feeds.

    Has anyone else experienced this? Is there a fix?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’ve been unable to find a graceful fix. For now, I’m using the workaround of copying the RSS feed into a local directory every minute (via cron), and pointing my Widgets at that local feed file.

    Specifically, this is my cron file:

    * * * * * wget -O /home/www/html/news.xml

    This may get fixed in WP 3.6

    Until then, there is an UGLY and POTENTIALLY UNSAFE change you can make to allow your server to access remote RSS feeds:

    edit [moderated – do not edit core WordPress files]

    on line 72, find the following:
    'reject_unsafe_urls' => true,

    change it to:
    'reject_unsafe_urls' => false,

    This is still not properly fixed in 3.6 — this latest release solves the problem for multisite blogs accessing another sub-site, but not separate WP installations, or RSS feeds from other hosts on the LAN whose external IP differs from the internal IP.

    MODERATOR: do not edit until there is a viable fix. We who modify core WP files know that this is a potentially unsafe and unstable solution, but until there is a viable workaround, this is the only means by which we may include certain feeds.

    There is an UGLY and POTENTIALLY UNSAFE change you can make to allow your server to access remote RSS feeds

    In WP 3.5:
    (1) edit wp-includes / functions.php
    (2) find 'reject_unsafe_urls' => true,
    (3) change it to 'reject_unsafe_urls' => false,

    In WP 3.6:
    (1) edit wp-includes / http.php
    (2) find function wp_safe_remote_request
    (3) remove (or comment out) the line $args['reject_unsafe_urls'] = true;

    BE AWARE that this will make your site VULNERABLE: if any of the sites you draw dynamic data from get spoofed, you could end up including rogue content in your site. Be EXTREMELY careful which URLs you use to include dynamic content.

    That said, a more stable approach would be to simply copy the RSS file to a local cache, then use the local version. For example, I would add the following cron job:

    * * * * * wget -O /home/www/news.xml

    …then simply access http://localhost/news.xml as my RSS feed

    Try add this in your functions.php file:

    function http_request_local( $args ) {
       $args['reject_unsafe_urls'] = false;
       return $args;
    add_filter( 'http_request_args', 'http_request_local' );
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘RSS Feeds from same parent domain not loading’ is closed to new replies.