Do you want to disable RSS feeds on your WordPress site? The RSS Feed allows users to subscribe to blog articles. However, if your blog does not have a blog section, you may want to deactivate this functionality. By default, it is not possible to delete the WordPress RSS feed.

In this tutorial, we will show you how to disable the RSS feed of WordPress.

deactivate the RSS feed WordPress

1 method: Disable RSS feed with a plugin

This method is easier and recommended for beginners.

The first thing you need to do is to install and activate the plugin " Disable Feed ". For more details, see our step-by-step guide on way to install a WordPress plugin.

The plugin works without configuration and it will start redirecting users to your Website when they access your RSS feed.

There are some settings available for the plugin. You must access the read settings to configure them.

Disable feed

By default, the plugin will try to redirect users to a contents related on your site when they request a feed. For example, users who request a category in the RSS feed will be redirected to that category. Users who attempt to access a custom post format's feed will be redirected to that post format.

You can change this behavior and instead display 404 errors.

You can also select not to deactivate the RSS feed and the comments feed. This will allow users to still subscribe to your RSS feed, but there will be no feed for categories, comments, authors etc.

Do not forget to save your settings.

2 Method: How to manually disable the RSS feed

This method requires the addition of PHP code on WordPress. So if you are not comfortable with code editing you will not succeed. We showed you how to create a WordPress plugin. So you can use it.

Just add this code to the functions.php file of your active theme or simply add it to your plugin.

function wpb_disable_feed () {wp_die (__ ('No feed available, please visit our homepage !')); } 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);

This code simply returns an error page when someone requests an RSS feed.

No feed code WordPress

It's as simple as that. Bravo you got there unscathed. Do not hesitate to ask us questions if you have any. We will endeavor to provide an answer.