Google Search Console – 404 Errors Related To Comment Feed


About The Author
Cabe Nolan is the founder of WP Cover where he shares his insight into WordPress, development, & entrepreneurship. Outside of WPCover, Cabe continues to run a successful WordPress development firm, Bold City Design as well as a few high profile websites, Arrivala, Two Way Resume, Dock Skipper, and a successful outdoors brand, DolfinPack.







Google Search Console – 404 Errors Related To Comment Feed

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.


Share Your Thoughts

Leave a Reply

Your email address will not be published. Required fields are marked *


Related Stuff You Might Like







WordPress News, Tips, & Code Snippets

Join the WP Cover mailing list and get wordpress news, tips, code snippets, security warnings, and more delivered right to your inbox.  We won't flood your inbox, newsletters typically go out every 1-2 weeks unless it involves an important security release.

You have Successfully Subscribed!