How to Disable RSS Feeds in WordPress?

Last modified: June 17, 2020
You are here:
Estimated reading time: 1 min

RSS is the short form of Rich Site Summary is a format for delivering web contents which are changing regularly, mainly news-related sites, weblogs are uses this to publish their contents regularly on their websites. let’s have an Idea about how RSS feeds work; RSS feeds are simple text files, once it submitted to feed folders, then will allow subscribers to view the content within a short period of time. As we know RSS feeds have a lot of Advantages, but at the same time, it has Disadvantages also. Let’s discuss some of them:

1) RSS feeds create higher traffic and demands on the server.

2) Since it is a new technology, many sites still do not support RSS.

3) Graphics and photos do not appear in all RSS feeds.

4) Publishers cannot determine how many users are subscribed to their feed and the frequency of their visits.

5) The identity of the source website may be unclear.

By default, there is no way to disable RSS feeds in WordPress, we can do it either via installing a plugin or manually. Let’s discuss how we can disable RSS feeds from WordPress websites.

 

Method-1

In this method, we can disable RSS feeds from WordPress by using a plugin called “Disable Feeds”. First, we need to install and activate the plugin on WordPress. The plugin will work immediately after activating it when a subscriber request for an RSS feeds then it will redirect to a website.

Normally if a user request for any RSS feeds then it will redirect to the corresponding HTML page, we can change this to display 404 error. We can configure this on our WordPress Dashboard. Click on “Readings” under “Settings” and you can pick the exact one and after making changes click on “Save Changes”.

Disable RSS feed

 

Method-2

In this method we need to edit the WordPress files, also make sure to avoid any unwanted changes on the files, it may break your website. You can simply add below code to your theme’s “functions.php” file.

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 will simply return an Error Page saying “No feed available, please visit our Homepage!”.

 

If you need any further help, please do reach our support department.

Was this article helpful?
Dislike 0
Views: 33