How To Disable RSS Feeds In WordPress

By placing the following code in your theme’s functions.php file (or a site-specific plugin) when someone tries to go to the RSS feed link ( they will receive a message that no feed is available.

UNLIMITED DOWNLOADS: 500,000+ WordPress & Design Assets

function firstwd_disable_feed() {
wp_die( __(‘No feed available,please visit our <a href=”‘. get_bloginfo(‘url’) .'”>homepage</a>!’) );
} add_action(‘do_feed’, ‘firstwd_disable_feed’, 1);
add_action(‘do_feed_rdf’, ‘firstwd_disable_feed’, 1);
add_action(‘do_feed_rss’, ‘firstwd_disable_feed’, 1);
add_action(‘do_feed_rss2’, ‘firstwd_disable_feed’, 1);
add_action(‘do_feed_atom’, ‘firstwd_disable_feed’, 1);
add_action(‘do_feed_rss2_comments’, ‘firstwd_disable_feed’, 1);
add_action(‘do_feed_atom_comments’, ‘firstwd_disable_feed’, 1);

This post may contain affiliate links. See our disclosure about affiliate links here.
Sign up for Envato Elements and get unlimited downloads starting at only .50 per month!


By default, there is no option to disable RSS feeds in WordPress, because RSS feeds allow users to subscribe to your blog posts. However, there are certain situations where you may want to turn off RSS feeds. There are a few plugins that you can use to do this, but whenever possible we always try to use as few plugins as possible and use our own code.

Posted by WordPress Guru