Tuesday, May 22, 2012

How to Disable / Stop RSS Feeds in WordPress - SEO Friendly Way


How to Disable / Stop RSS Feeds in WordPress 
Anyone who uses Wordpress may want to stop RSS feeds to stop spammers and scammers.  The common approach is the following function added to functions.php : 


function fb_disable_feed() {wp_die( __(‘No feed available,please visit our homepage!’) ); }
add_action(‘do_feed’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rdf’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rss’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rss2′, ‘fb_disable_feed’, 1);
                                              add_action(‘do_feed_atom’, ‘fb_disable_feed’, 1);

What's wrong this function ?

Well it returns a HTTP Status code of 500
                                           500 (Internal server error)                        The server encountered an error and can't fulfill the request.

Not terribly SEO friendly. Too many 500 errors call into question the reliability of that site. Google doesn’t want to send users to a site that ultimately times out and doesn’t load.


Need a better solution, email me.



No comments:

Post a Comment