How To Disable RSS Feeds In WordPress

RSS allows users to easily stay informed by retrieving the latest content from your site. It is turned on by default and there is no option to turn it off. So if you wish to disable the RSS feeds for your website, follow the steps below.

How to Remove RSS Feeds Using a Plugin

The plugin you want is called Disable Feeds. This plugin works out of the box, all you need to do is install and activate it. By default it will redirect feed requests to corresponding html pages. For example, users requesting category feed will be redirected to category page.

If you want to change the settings for this plugin, you can go to Settings » Reading page and configure the settings.

How to disable RSS feeds for WordPress using a plugin

How To Manually Disable RSS Feeds Link In WordPress

It is easy to disable RSS feeds without using plugin, simply add the code below to your theme’s functions.php

function wpb_disable_feed() {
wp_die( __('No RSS feed available,please visit our homepage for daily updated contents!') );
}

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);

Now if anyone tries to access the feeds for your website, they will receive the following message with a link back to the homepage.

How to disable RSS feeds in WordPress without using any plugin

We hope this article helped you learn how to disable RSS feeds in WordPress.

You May Also Like