If you want to disable WordPress RSS feeds from your WordPress Public Website, So on this article will help you about how we can Disable feed URL from our WordPress Website. WP RSS feeds allow on website users to subscribe and many more to your blog/Website Article. This automatically generates links by WP system on your Website’s header, For example you or anybody can view this RSS feed link from website’s source code, RSS Feeds is a Simple Syndication are the simple text files that with the basic updated information and stream of WordPress website updates. It is a presented to the users using software or Apps. This feeds allow subscribers to see content within very short time after it’s updates.
What type are RSS feed? For example look at here.
http://mydomain.com/feed/rss/
http://mydomain.com/feed/rss2/
http://mydomain.com/feed/rdf/
http://mydomain.com/feed/atom/
Anyway if you don’t like to show this RSS feed URL from your Blog/Site’s source code for public you can disable this just follow the below step.
METHOD 1:
You can disable RSS Feed with Plugin:
Step 1: First go to the “Plugins” from left sidebar on your WordPress dashboard and now click on “Add New” button from top section on plugins page.
Step 2: After click on Add New button then you can search suitable plugins for disable feed URL, So you to type the few words “Disable Feeds” or something else related keyword from search box on the top right corner and wait a moment, Now can see lot of more related plugins but you have to select the best plugins which is best for you, On this topic have suggested you name of the Disable Feeds plugins for example please look at the screenshot.
Now Click on “Install Now” button then Active the current installed plugins.
Step 3: After Plugin activated then go to the “Settings” menu from left sidebar and click on the “Reading” options from Settings menu.
Step 4: Now tick on the “Redirect feed requests to corresponding HTML content” and finally click on “Save Changes” and save your works.
Now from your Website/Blog RSS feed URL successfully disabled.
METHOD 2:
Disable RSS Feeds by using functions Code:
The method 2 to disable a WordPress Website/Blog’s RSS feed is to simply use the code inside your functions.php file just copy and paste the following given code direct into your functions.php direct from your current installed theme folder.
Step 1: Login to your WordPress Dashboard.
Step 2: Go to “Appearance” Menu from Sidebar.
Step 3: Click on “Theme Editor” from Appearance menu.
Step 4: Now find the “functions.php” file from right sidebar.
Step 5: Now drop the below code inside functions file after other function code ending.
Step 6: Finally “Update File” and now done.
wp_die( __(‘Sorry but this page has disabled by site owner, Please visit our <a href=”‘. get_bloginfo(‘url’) .'”>homepage</a>!’) );
}add_action(‘do_feed’, ‘myrssdisable_feed’, 1);
add_action(‘do_feed_rdf’, ‘myrssdisable_feed’, 1);
add_action(‘do_feed_rss’, ‘myrssdisable_feed’, 1);
add_action(‘do_feed_rss2’, ‘myrssdisable_feed’, 1);
add_action(‘do_feed_atom’, ‘myrssdisable_feed’, 1);
add_action(‘do_feed_rss2_comments’, ‘myrssdisable_feed’, 1);
add_action(‘do_feed_atom_comments’, ‘myrssdisable_feed’, 1);
After Disabled you will see look like this on feed page.
Maybe this article is helped you, About how to Disable RSS feed in WordPress site.
For more info: Visit WordPress Code Reference
In the end
I hope you have found this article helpful. Let us me your opinion or questions if any through the comment form in below or use this form to ask your question.