Google Search Console – 404 Errors Related To Comment Feed
Google Search Console – 404 Errors Related To Comment Feed
Apr 29, 2018
Google Search Console – 404 Errors Related To Comment Feed
This post was originally created on our sister site WP Cover. View Original Article April 29, 2018
We recently had a client site under management start receiving 50+ 404 errors in the Google Search Console that related to comment feed links found in the header of a custom post type. The comments for the custom post type had been disabled but the feed link was still being populated in the header. Here’s a screenshot of what the Google search console looked like as a result:
In order to resolve the issue, a function to remove the comment feed from post was implemented in the functions.php file as follows:
// disable comment feeds for individual posts
function wpCoverdisableCommentFeedLink($for_comments) {
return;
}
add_filter('post_comments_feed_link','wpCoverdisableCommentFeedLink');
Following that change, we marked the issues as fixed in search console which wrapped up the issue.