Are you wish to disable RSS feeds on your WordPress website? RSS feeds permits users to subscribe to your blogs. But when creating small static sites, you may want to disable RSS feeds. By default, you have no option to disable or remove RSS feeds in WordPress. In this post, we will explain you to how to do it.

Ways to Disable RSS Feeds in WordPress

There are two methods to disable RSS feeds in WordPress:

Method 1: Disable RSS Feeds Using a Plugin

This method is very easy and is recommended for beginners. In this method there are some steps to follow:

First, you have to install and activate the Disable Feeds plugin.

This plugin works out of the box. It will start redirecting users to your site when they request RSS feed.

There are some settings available for the plugin. You have to go to the Settings > Reading page to configure settings.

By default, it will try to redirect users to related content on your website when they request a feed.

For example, when users requesting the category feed then it will be redirected to the category page. Or if they requesting the custom post type RSS feed it will be redirected to the custom post type archive.

You can change this and show a 404 error page to users.

Also, you can choose not to disable the global RSS feed and comment feed.

This will permits users to subscribe to your RSS feed but there will be no individual category, author or no post comment feeds.

At last, click on the save changes button to save your setting.

Method 2: Manually Disable RSS feeds

In this method, you need to edit WordPress files.

If you are comfortable to change pasting snippets from the web into WordPress then you can easily use this method.

Simply add the code shown in below to your theme’s function.php files or a site-specific plugin.

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

This code gives an error page when users request an RSS feed.

Conclusion

Here, we have discussed simple methods to disable RSS feeds in WordPress. We hope this post will help you to disable RSS feeds in WordPress. If you have any problem related to disabling it, tell us in the comments section. We are very happy to help you. If you liked this post, then please share the blog with your peers.

If you have any WordPress questions feel free to ask us as you can get our expert advice. For the same, our support team is always ready to deliver WordPress Customer service. Just dial our support phone number +1-855-945-3219(Toll-Free) to know how our professionals can help you. That’s all, thanks!

Read More Blogs: