How To Disable RSS Feeds In WordPress Without Plugin

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 Manually Disable RSS Feeds 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. If editing functions.php is too technical, you can also disable RSS feed by installing a plugin called Disable Feeds, please see our tutorial on How To Disable RSS Feeds In WordPress With Plugin.