Some webmasters and small business owners use wordpress as CMS. They do not need any sort of RSS feed. This is also good for security and private space blogs. You can easily disable all RSS feed.
Click on Appearance > Themes > Theme Editor > Locate and edit your functions.php.
Append following php code:
/** * Disable Our Feed Urls */ function disable_our_feeds() { wp_die( __('<strong>Error:</strong> No RSS Feed Available, Please visit our <a href="'. get_bloginfo('url') .'">homepage</a>.') ); } add_action('do_feed', 'disable_our_feeds', 1); add_action('do_feed_rdf', 'disable_our_feeds', 1); add_action('do_feed_rss', 'disable_our_feeds', 1); add_action('do_feed_rss2', 'disable_our_feeds', 1); add_action('do_feed_atom', 'disable_our_feeds', 1);
Save the changes.

{ 13 comments… read them below or add one }
Great!! It worked!
no more RSS feed
Thanks a lot! This worked great.
It works !! Thanks a ton !
For novices like me the complete code with php tags is :
this is nice but the rss icon in the url (firefox) is still there. Why ?
Manu’s issue is the same as mine….the RSS icon needs to go away somehow also….any suggestions?
in your header.php remove meta tags related to rss feed and the icon will be removed….
Unfortunately /feed/rss will still work, so this is no solution.
I agree, this is a wast of time: it does not work!!!!
Try this:
create a directory called “feed” in your wordpress root and upload a blank index page (e.g. index.html or index.php etc.). RSS links from WP will display a wonderful white page instead of rss file.
great tip! YAY! thanks!
Instead of the wp_die, I use wp_redirect(get_option(’siteurl’)); which just sends them back to the homepage. I also disable rss from the head by removing it from the template altogether. Combined these remove the icon and the actual feed url from working at all.
Thanks for a neat, clean solution!
Any idea how this can be used to OVERWRITE the template being used e.g. for RSS2? I don’t want to change the core files, but it seems like there is no other way…