WordPress is primarily known by people for its powerful blogging features. RSS Feeds are used by people to subscribe to your new content that you post and also to feed into third-party reader applications such as Feedly. This way they can read your fresh content on the go. However, not everyone uses the blogging portion of WordPress and for some businesses, in fact, might simply want to in WordPress disable RSS feeds altogether. This is then one less thing they have to worry about.

wordpress disable rss

By default WordPress generates all kinds of RSS feeds that are built in, such as:

http://example.com/feed/
http://example.com/feed/rss/
http://example.com/feed/rss2/
http://example.com/feed/rdf/
http://example.com/feed/atom/

It also generates them for your categories, tags, comments, etc.

WordPress Disable RSS Feed

There are a couple different ways to disable RSS feeds in WordPress. You can do it with a plugin or with code.

1. Disable RSS Feed with Plugin

The first way to disable a WordPress RSS feed is to use a free plugin like Disable Everything. This plugin disables all RSS/Atom feeds and feed links on your WordPress website by redirecting all the requests.

You can download Disable Everything from the WordPress repository or by searching for it within your WordPress dashboard under “Add New” plugins. Once the plugin has been installed and activated, simply head over to the Disable Everything “settings” area and check the checkbox to disable all RSS feeds and feed links.

Disable Everything plugin
Disable Everything

You could also use a premium plugin like perfmatters (developed by a team member at Kinsta), which allows you to both disable RSS feeds and disable RSS feed links, along with other optimizations for your WordPress site.

Disable RSS feeds with perfmatters
Disable RSS feeds with perfmatters

2. Disable RSS Feed with Code

The second method to disable a WordPress RSS feed is to simply use code.

Important! Editing the source code of a WordPress theme could break your site if not done correctly. If you are not comfortable doing this, please check with a developer first.

Before you get started, create a backup and use a child theme, so you won’t lose your changes if you update your theme. Then, copy the following code into your child theme’s 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 if a person visits an RSS feed on your site, domain.com/feed for example, they will see the following message.

rss feed disable warning
RSS feed warning

WordPress also generates links to the RSS feeds within your webpage’s header, as seen in the screen below. You can go one step further and remove these links from within your pages HTML code.

rss-feed wordpress header
RSS feed in WordPress header

Copy the following code into your functions.php file to remove the header links to your RSS feeds.

remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'feed_links', 2 );