Every post in your WordPress blog has a comment feed link. Generally those feeds are empty because most posts don’t have any comments.
This code snippet will remove all comment feed links from posts.
Watch tutorial on YouTube.
Code snippet
// disable comment feeds for individual posts function veppa_disable_post_comments_feed_link($for_comments) { return; } add_filter('post_comments_feed_link','veppa_disable_post_comments_feed_link'); // kill all extra feed links in the head remove_action('wp_head','feed_links_extra', 3);
Benefits
- Prevent linking to empty feeds. Less useless URLs to crawl.
- Less crawl errors in Google Search Console.
- Crawl budget optimization by removing links to empty feeds.
- Cleaner HTML head tag.
After removing “Post comment feed link”
Screenshot shows that “post comment feed link” is removed from HTML header in WordPress after applying current code snippet.
Should I disable all feeds?
No, because RSS feed can be used by your audience to read latest blog posts. Search crawlers also can use it to crawl latest content on your blog.
Will this disable feed page?
No, comment feed page will continue working. This code snippet will only remove link to comment feed for each post.
Once you remove link to those mostly empty RSS feeds, search engines will gradually stop crawling them.
—
What is next: