WebHostingPeople Blog

  • Domains
    • Shared Hosting

  • Cloud VPS
  • Servers
    • Client Area Login

How Can We Help?

How to Disable RSS Feeds in WordPress?

You are here:

RSS stands for Really Simple Syndication, which is a format for delivering web content that changes frequently, especially on news-related websites. Bloggers often use RSS feeds to publish their content regularly on their sites. Let’s understand how RSS feeds work: RSS feeds are simple text files that, when submitted to feed folders, allow subscribers to view the content within a short period of time. While RSS feeds have many advantages, they also come with disadvantages. Let’s discuss some of them:

  1. RSS feeds create higher traffic and demands on the server.
  2. Many websites still do not support RSS because it is a relatively new technology.
  3. Graphics and images may not appear in all RSS feeds.
  4. Publishers cannot determine the number of subscribers to their feed or the frequency of their visits.
  5. The source website may be unclear.

By default, there is no built-in method to disable RSS feeds in WordPress. However, you can do it either by installing a plugin or manually. Let’s discuss how to disable RSS feeds from WordPress websites.

Method 1:

In this method, we will disable RSS feeds from WordPress by using a plugin called “Disable Feeds.” First, you need to install and activate the plugin on WordPress. The plugin starts working immediately after activation. When a subscriber requests for an RSS feed, they will be redirected to a website.

Typically, when a user requests any RSS feed, they are redirected to the corresponding HTML page. We can change this to display a 404 error. You can configure this on your WordPress Dashboard. Go to “Settings” and click on “Reading.” Select the appropriate option, and after making the changes, click on “Save Changes”.

Disable Rss Feed

Method 2:

In this method, we need to edit the WordPress files. Make sure to avoid any unwanted changes to the files as it could break your website. You can simply add the following 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 stating “No feed available, please visit our Homepage!”

If you need further assistance, please reach out to our support department.

Post Your Comment