Home How-to Disable RSS Feeds in WordPress websites

Disable RSS Feeds in WordPress websites


Do you want to disable RSS feeds on your WordPress site? RSS feeds allow users to subscribe to your blog posts. However when building small static websites, you may want to turn off the RSS feeds. By default, there is no option to remove RSS feeds in WordPress.

In this article, we will show you how to disable RSS feeds in WordPress

Method 1: Disable RSS Feeds Using a Plugin

This method is easier and is recommended for beginners.

First thing you need to do is install and activate the Disable Feeds plugin.

The plugin works out of the box and it will start redirecting users to your website when they request an RSS feed.

There are a few settings available for the plugin. You need to visit Settings » Reading page to configure them

Disable RSS Feeds in WordPress websites

By default, the plugin will try to redirect users to related content on your site when they request a feed. For example, users requesting a category feed will be redirected to category page. Users trying to access custom post type RSS feed will be redirected to the custom post type archive.

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

You can also select not to disable the global RSS feed and comments feed. This will allow users to still subscribe to your RSS feed, but there will be no individual category, author, or post comment feeds.

Don’t forget to click on the save changes button to store your settings

Method 2: Manually Disable RSS Feeds in WordPress

This method requires you edit WordPress files. You can use this method if you are comfortable pasting snippets from web into WordPress.

Simply add this code to your theme’s functions.php file 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 simply returns an error page when someone requests an RSS feed.

Disable RSS Feeds in WordPress websites

Previous articleScariest Moments on Scooby-Doo 👻
Next articleHot Looks in Sequin Outfits : Ashi Singh and Siddharth Nigam


Please enter your comment!
Please enter your name here