Users can subscribe to your blog posts via RSS feeds but in case of small static website, you may want to turn off the RSS feeds. There are two methods to turn off RSS feeds and both these methods are described in the following text.
Disable RSS Feeds by Plugin :
If you are beginner then this method is recommended as it is the easier one. You should Install and Activate a free plugin like “Disable Feeds”. You can Search and Download the Disable Feeds Plugin through:
Disable Feeds plugin disables all types of RSS Feeds as well as BuddyPress Group Feeds &bbPress Forum Feeds by redirecting all the requests.
You can also change the default settings of the Plugin Disable Feeds through:
By default, Disable Feeds Plugin will redirect the users to content page related with the requested feed and you can change this to show the users a "404 Error". You can also set the plugin to not disable the global RSS Feed as well as Comments feed. After configuring all the settings, click on the save changes button. A Premium Plugin like "perfmatters" will allow you to disable both RSS Feeds as well as the RSS Feeds Links.
Disable RSS Feeds in WordPress Manually :
In this method you will have to edit your WordPress files. You should copy the following code to your Wordpress Theme’s "functions.php" file or a Website's Specific Plugin.
If anyone request for an RSS feed then this code will return an error page.
Disable RSS Feeds by Plugin :
If you are beginner then this method is recommended as it is the easier one. You should Install and Activate a free plugin like “Disable Feeds”. You can Search and Download the Disable Feeds Plugin through:
- Login to wordpress.
- Click on Plugins >> Add new >> Here you can search for new plugin.
Disable Feeds plugin disables all types of RSS Feeds as well as BuddyPress Group Feeds &bbPress Forum Feeds by redirecting all the requests.
You can also change the default settings of the Plugin Disable Feeds through:
- Login to Wordpress.
- Click on settings >> Reading page >> Here you can disable feeds.
By default, Disable Feeds Plugin will redirect the users to content page related with the requested feed and you can change this to show the users a "404 Error". You can also set the plugin to not disable the global RSS Feed as well as Comments feed. After configuring all the settings, click on the save changes button. A Premium Plugin like "perfmatters" will allow you to disable both RSS Feeds as well as the RSS Feeds Links.
Disable RSS Feeds in WordPress Manually :
In this method you will have to edit your WordPress files. You should copy the following code to your Wordpress Theme’s "functions.php" file or a Website's Specific Plugin.
Code:
functionwpb_disable_feed() {
wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
}
add_action('do_feed', 'wpb_disable_feed', 1);
add_action('do_feed_rdf', 'wpb_disable_feed', 1);
add_action('do_feed_rss', 'wpb_disable_feed', 1);
add_action('do_feed_rss2', 'wpb_disable_feed', 1);
add_action('do_feed_atom', 'wpb_disable_feed', 1);
add_action('do_feed_rss2_comments', 'wpb_disable_feed', 1);
add_action('do_feed_atom_comments', 'wpb_disable_feed', 1);