How to Disable RSS feeds in WordPress

How to Disable RSS feeds in WordPress

A question that many WordPress users have is how exactly they can disable the RSS feeds. We in this article will try to discuss how this can be done. With the help of RSS feeds users can subscribe to your blog posts. It is quite possible that sometimes you would like to block the RSS feeds as you have a static website. There is no default option to remove the RSS feeds in WordPress. However, we will explain in this article how the RSS feeds can be disabled in WordPress. We hope that this article will be able to solve all your questions regarding the turning off of RSS feeds. There are primarily two methods and they are:

  1. Disable the RSS feeds using a plugin
  2. Manually disable RSS feeds in WordPress

We will explain in details both the methods in the article.

                   

 

Method 1 : Disable the RSS feeds using a plugin – If you are a beginner in WordPress then this is the method that we will be suggesting because it is simple to use. As this can be done using a plugin so the first step is that you will have to install and activate the plugin and this plugin is called “disable feeds plugin”. We have already dedicated an article on how to install WordPress plugins you can refer that article and try to understand the process. Once you have installed and activated the plugin you will notice that it has the ability to work out of the box and it will start to redirect the users to your site when the users request for a RSS feed.

You must ensure that the settings you are applying for the “disable feeds plugin” is correct and to check that you will have to add the enclosed settings as shown in the screenshot. Just go to settings and then go to the reading page to configure the settings as follows. Until the setting is correct the plugin will not work as you desire.

The “disable feeds plugin” will automatically start to redirect the users to the related content on your site as and when they request a RSS feed. To explain this better we will give an example suppose a user is requesting for a category feed they will be redirected to the category page. Similarly if an user is trying to access the custom post type RSS feed they will by default be redirected to the custom post type archive.

There is also a possibility that you change the behaviour and show the users a 404 error page. In the settings you can also ensure that you choose the option of not to disable the global RSS feed and the comments feed. Doing this will ensure that the users can subscribe to your RSS feeds but there will not be any individual category , post comment feed or author. As we always mention, do not forget to save the settings else all the changes you have made will not be saved.

 

Method 2 : Manually disable RSS feeds in WordPress – We will now move to the second method of ensuring that the RSS feeds are turned off. As the name itself suggests in this method you will have to manually edit the WordPress files. We will not recommend this method to someone who is new to WordPress. This can be used by someone who has been working on WordPress for sometime and can comfortably paste the snippets from the web to the WordPress. We are giving the code in the screenshot attached below all you have to do s add this code to your theme’s functions.php file or to the site specific plugin.

             

What this code does is simple as soon as someone requests for a RSS feed it will return an error page similar to the one that we have depicted in the screenshot below.

We hope that after reading this article the readers will get a good idea of how they can actually block the RSS feeds. We are constantly trying to ensure that we can resolve all the queries that the readers have about WordPress. We will keep writing more articles on similar topics about WordPress do keep checking our site. Please share your valuable feedbacks and we will definitely try to improve on our articles.