'disable_rss', 'title' => 'Disable RSS feeds', 'desc' => 'Redirect all feeds to the homepage', 'icon' => 'rss', 'risk' => 'recommended', 'level' => 'standard', 'audience' => 'business', 'priority' => 8, 'benefit' => 'If nobody follows your site with a feed reader or a newsletter tool that reads your feed, turning feeds off removes an easy way for scrapers to copy new posts.', 'help' => 'WordPress publishes feeds at /feed/ and for categories, tags, authors and comments. With this on, every feed URL gets a 301 redirect to the homepage and the feed links are removed from the page head. Feed readers, podcast apps and newsletter tools that read your feed stop getting updates.', 'before' => '/feed/ shows your latest posts as XML', 'after' => '/feed/ redirects to the homepage.', 'detect' => function () { return array( 'detected' => true, 'message' => 'RSS feeds publicly accessible', 'safe' => true, 'savings' => 'Security + Performance', ); }, 'callback' => function () { add_action( 'template_redirect', function () { if ( is_feed() ) { wp_safe_redirect( home_url(), 301 ); exit; }} ); add_action( 'wp_head', function () { remove_action( 'wp_head', 'feed_links', 2 ); remove_action( 'wp_head', 'feed_links_extra', 3 ); }, 1 ); }, );