0

I'm having trouble reading RSS feeds created by WP3 on the same domain.

When I do a print_r($rss); at the part of my plugin where it does the RSS parsing, I get the following output:

WP_Error Object ( [errors] => Array ( [simplepie-error] => Array ( [0] => WP HTTP Error: couldn't connect to host ) ) [error_data] => Array ( ) )

The RSS feed address being supplied validates and everything, btw.

It seems to me the issue has something to do with the webserver being unable to grab its own RSS feeds. This is all very confusing. There's a blog post that seems to identify the issue at: http://www.ajaykumarsingh.com/wordpress/rss-error-wp-http-error-couldnt-resolve-host.html

...Alas, it does not contain any solutions.

Any ideas for a workaround would be much appreciated.

2

Anyone with a similar issue:

First off, try the following after connecting to your webhost via SSH:

ping <yourwebsite>

If you get a "cannot connect to host" issue, there's a firewall or NAT problem blocking traffic for RSS. Contact your server admin.

1

Further to this, if you have access to the server and not the firewall or are unsure of how to configure it, you can try adding the url of the site you're having trouble with and the local ip of the server into your hosts file. (C:\WINDOWS\system32\drivers\etc)

e.g.

(server IP) www.yourdomain.com

the server will then look at itself on the local network before connecting to its own external IP (which it currently cant)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.