WordPress is a robust content management system that offers many blogging features. Feed is one of the popular features that allows feedreader services to fetch and syndicate the latest content from a blog. This is a way many news websites collect feeds from various sources and offer to their readers. However, for an individual blog feeds can create problems than helping. In this article, we will explain what is feed and how to disable WordPress feed to protect your site.
What is Feed?
Feed is a function in your WordPress installation that creates set of XML files. Feedreaders like FeedBurner, Feedly and many other services can check these XML feed files and grab the latest content from your site. Users subscribed to your blog feed can get the latest content on their browser as a notification. This helps you new content to reach out the users seamlessly without much effort from your side.
There are different types of feeds available like RSS1.0, RSS2.0, Atom and RDF.
WordPress Feed URLs
WordPress generates feed URLs for all types of feeds. You can generally access the feed URLs using the below syntax:
https://yoursite.com/?feed=rss
https://yoursite.com/?feed=rss2
https://yoursite.com/?feed=rdf
https://yoursite.com/?feed=atom
The syntax will change when you have custom permalinks structure.
https://yoursite.com/feed/
https://yoursite.com/feed/rss/
https://yoursite.com/feed/rss2/
https://yoursite.com/feed/rdf/
https://yoursite.com/feed/atom/
In general, you can simply add /feed/ suffix to any URL on your WordPress site to view the XML feed content.
Let us say, you have published a post and assigned one category and a tag. Here are some of the feed URLs WordPress will generate:
yoursite.com/feed/
yoursite.com/category/feed/
youstie.com/tag/feed/
yoursite.com/post-name/feed/
yoursite.com /comments/feed/
yoursite.com/post-name/comments/feed/
yoursite.com/author/feed/
yoursite.com/date-archive/feed/
The structure and the numbers depend on the permalinks and your WordPress setup. You can refer this WordPress support article to know more about these feeds.
In addition to all these URLs, WordPress also adds feed links in the meta data. You can see this in the source code of your page.
Why You Should Disable WordPress Feed URLs?
Now that you may wonder the need of disabling feeds in your site. Here are some of the valid reasons you should consider disabling the feeds:
- As you can see, WordPress generates too many feed URLs for each post you publish.
- You are not using feedreader service.
- Content scrapers can easily steal your content from these feed URLs.
- You may lose the ranking in search engine results and the scrapped websites may top your original content.
- Auto-blogging, aggregators and syndication websites can also take your content from feed without your permission.
- You will see soft 404 errors in Google Search Console for some of the feed URLs.
- With so many social networking platforms to reach your audience, you do not need RSS feed anymore.
We have explained the problem with content scraping in WordPress in our earlier article. If you are not using feedreaders, then we strongly recommend disabling feeds to protect your site.
How to Disable WordPress Feeds?
The best option to disable WordPress feeds is to use a security plugin. There are many plugins available for this purpose and we will explain the way to disable feed with and without plugin.
Disable Feed with SG Security
SiteGround offers quality hosting along with some plugins to optimize WordPress sites. SG Security their latest security plugin to protect WordPress sites from malicious attacks. Like SG Optimizer plugin which is available for all users, anyone can use SG Security plugin also.
- Install and activate SG Security plugin on your site.
- Navigate to “SG Security > Site Security” menu.
- Scroll down on the page and enable the switch against the option “Disable RSS and ATOM Feeds”.
This plugin will redirect all automatically generated WordPress feed URLs to the home page of your site. This is a super easy way to disable feeds in your WordPress site and protect from content scrapers and auto-blogging websites.
Disable WordPress Feed without Plugin
If you do not want to install additional plugin only for this purpose, then it is also possible to disable feed URLs manually. You have to edit functions.php file and add the following code at the end of the file. Make sure to use a child theme so that your changes are retained when you update your theme.
function disable_feed() {
wp_die( __( 'This site does not have a feed, visit the <a href="'. esc_url( home_url( '/' ) ) .'">home page</a>!' ) );
}
add_action('do_feed', 'disable_feed', 1);
add_action('do_feed_rdf', 'disable_feed', 1);
add_action('do_feed_rss', 'disable_feed', 1);
add_action('do_feed_rss2', 'disable_feed', 1);
add_action('do_feed_atom', 'disable_feed', 1);
add_action('do_feed_rss2_comments', 'disable_feed', 1);
add_action('do_feed_atom_comments', 'disable_feed', 1);
This code will disable all feed URLs and show a custom message to visit your home page.
Remove Feed Links from Source
Using plugin or manually inserting the code will not remove the feed links from the source of your page. In order to remove them, add the below code snippet in your functions.php file.
remove_action('wp_head', 'feed_links', 2 );
add_filter('post_comments_feed_link',function () { return null;});
Save your changes and check the source code of any page on your site. You will not see the feed links now.
Perfmatters Optimization Plugin
If you are already using a security plugin, then SG Security will be a redundant plugin and it’s not good to use additional plugin only for disabling feeds on your site. In addition, SG Security plugin will not remove the feed links from the header section for which you may need to use manual option as explained above. Perfmatters is an alternate option offers complete optimization features for removing unnecessary bloat from WordPress installation. You can avoid editing theme files and use Perfmatters to disable the complete trace of all feeds from your site. Though this is a premium plugin, you can get it for less than $25 for single license with one year support and updates.
- After installing the plugin and activating your license, go to “Settings > Perfmatters” menu.
- Navigate to “Options > General” section and scroll down a bit.
- Find and enable the options “Disable RSS Feeds” and “Remove RSS Feed Links”.
- Scroll down to bottom and click “Save Changes” button.
- If you have any caching plugin, make sure to purge the cache for the changes to take effect on the live site.
Perfmatters also offers other features to remove WooCommerce files, remove unused CSS, manage scripts and CSS per post and delay JavaScript to eliminate total blocking time.
Insert Additional Details in Feed
If you are using feedreader services, then disabling feeds is not a good option for your site. The alternate solution is to insert some additional text in your feeds to tell the users that you are the owner of the content. For example, you can insert a sentence like “This post is originally published in my blog name”. This will help readers to understand the source and many scrapers also will avoid stealing content from such feeds.
You can insert custom text in your feeds using Yoast SEO plugin.
- After installing and activating Yoast SEO, go to “SEO > Search Appearance” section.
- Add your custom text using the available variables.
- Save your changes.
You can also use other plugins like Rank Math for this purpose.
Final Words
If you have a new WordPress blog or started getting traffic, we strongly recommend disabling all feeds. This will help to stop reproducing your content on other sites on the syndication and protect your site. if you have an established blog, then check how much traffic you are getting through feeds. This will help in deciding whether disable feed of keep it. At any case, make sure to monitor the usage of your feed URLs and take action when you see some websites stealing content without permission.
Leave a Reply
Your email is safe with us.