How to Disable RSS Feed in WordPress?

How to Disable RSS Feed in WordPress

Do you want to Disable RSS Feed in WordPress website?

Really Simple Syndication(RSS) is used to share content among the users. It allows users to subscribe to your blog posts. 

But, in the cases, when users create a small static website or business websites, they may want to turn off the RSS Feed. Usually, all the websites have their own social media platform where they release the new contents and let people know about it. So, there’s no need for RSS Feed.

You can’t remove the RSS Feed from the website but you can disable it. There are various ways of disabling the RSS Feed. You can do it either with the plugin or the code. 

Disable RSS Feed using Plugin

Plugins are always a great way to add or remove default features of WordPress website. In order to disable RSS Feed, you need to Install Disable Feeds plugin. To Install a plugin, follow our tutorial guide on ‘How to Install WordPress Plugin?’

After you are done with installing the plugin, 

  • Click on Settings>>Reading
  • Select discourage search engines from indexing this site button. 
  • Save the Changes. 

Disable RSS Feed using Code

The next way is by using the code. This method requires a simple edit in your WordPress files. Simply copy the below code in your functions.php file. 

function itsme_disable_feed() {

 wp_die( __( ‘No feed available, please visit the <a href=”‘. esc_url( home_url( ‘/’ ) ) .'”>homepage</a>!’ ) );


add_action(‘do_feed’, ‘itsme_disable_feed’, 1);

add_action(‘do_feed_rdf’, ‘itsme_disable_feed’, 1);

add_action(‘do_feed_rss’, ‘itsme_disable_feed’, 1);

add_action(‘do_feed_rss2’, ‘itsme_disable_feed’, 1);

add_action(‘do_feed_atom’, ‘itsme_disable_feed’, 1);

add_action(‘do_feed_rss2_comments’, ‘itsme_disable_feed’, 1);

add_action(‘do_feed_atom_comments’, ‘itsme_disable_feed’, 1);

Now when a person requests RSS Feed on your website, it will show an error. 

Here, we are successfully done with disabling RSS Feed in your WordPress website using two different methods i.e code and plugin. Simply make these changes in the site. It’s easy, simple and quick.


Please enter your comment!
Please enter your name here