• 404 Errors from /feed/ Added to My Pages
    Since installing and using 4.7 I keep getting 404 errors from Google and my own plugin about my links. These 404 errors all have correct addresses with the addition of /feed/ to each page. Since I have hundreds of pages on my website it is not practical to just make a 301 for every page. I would like to know what and where this /feed/ address is being appended to all of my pages so that I can disengage it. My website is not a blog. My website is not about feeds. My website is strictly pages and links to other pages. All the addresses work once the /feed/ is removed. All the addresses generate 404 errors with the /feed/ false appending. I have tried researching the problem but just get info on feeds and how to make them. I am not interested in feeds. Thanks for any assistance. Again, I did not have this problem before installing 4.7 which otherwise causes no problems and is a stable update. Thanks for any help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    There’s a number of feed links in the head section. They’ve been there for quite a while. Maybe Google just started following these links?

    The following code will suppress the feed links in head, but Google will keep trying to access the feeds for a good while before it gives up.

    //suppress feed links in <head>
    add_action('plugins_loaded', 'bcw_remove_hooks');
    function bcw_remove_hooks() {
    	remove_action('wp_head', 'feed_links', 2 );
    	remove_action('wp_head', 'feed_links_extra', 3 );
    }

    To stop Google from continuing to report 404 errors in the mean time, the feed links need to be working. Did you attempt to disable them or did they just stop working, possibly with the 4.7 update? If they just stopped working, it’s probably due to a plugin or theme conflict. If you have any interest in having functioning feed links (if only to quiet Google), you should do the switch to twentysixteen and deactivate all plugins routine to get them working, then reactivate one by one to find the problem plugin or theme.

    You could customize your feeds so they always return something like “You’re not getting anything from this, so go away!” :>

    Thread Starter KevinFitz

    (@kevinfitz)

    Thank you for your reply.

    Do the feed links you spoke of occur in the head of every page? I am familiar with html headers, but not php headers.

    To answer your question, no I did not try to disable them. I have no clue why there even are feed links since I have no feeds. Is there any point or use to them when I do not intend to have any RSS feeds?

    If these links are not being followed by anyone but search bots, then it hardly matters that they are broken.

    I think I understand the code you kindly provided; however, I do not know where to place it in my theme. I have used the “Editor” before, and I have the ability to program, but I have no fluency in php at all. Perhaps in the “header.php” file somewhere?

    Thanks again for your reply and concern with my problem.
    Happy New Year!

    Moderator bcworkz

    (@bcworkz)

    Yes, the links normally appear in the head section of every page. PHP headers do not factor into this. Feeds are a built in feature of every WP installation. It’s a legacy of WP’s blogging roots. When used as a general CMS, feeds often don’t make sense. Feeds used to be a common way for blog readers to keep track of their favorite writers before social networks dominated the scene.

    The only reason to maintain feed functionality is because adding “/feed” to a WP URL is a well known way to get a feed even if there were not links in the head section and you’re likely going to get such requests even without the links. If fixing the feeds isn’t too much hassle, I recommend fixing it just to appease Google because it’s going to keep trying to reach those links for a good while longer after the feed links are removed and report 404 errors when they can’t be found. I don’t know if these 404s affect the main site’s search ranking, it’s conceivable that many 404s affect an overall site quality factor.

    Any kind of filter or action hook code like I provided can be placed in your theme’s functions.php file. Just add it to the bottom of the file. The one problem is any added code will be lost when the theme is updated. There’s two ways to protect custom code from updates. Either create a child theme or a simple plugin. Either one is fairly easy to do and well worth the effort IMO. If you have a commercial, framework based theme, it is probably taking up the child theme position already. In such cases a plugin is the only option.

    Be really careful using the built in theme editor. There’s no backups and the slightest coding error could lock you out of the site. I suggest editing a local copy and uploading by FTP or the cPanel file manager. That’s also how to recover if you do get locked out.

    Thread Starter KevinFitz

    (@kevinfitz)

    Thank you again for your time and thoughtful response.
    I think I understand enough now to make an intelligent decision.

    I do make daily (remote) backups so I do not lose too much work if things crash for some reason.
    I appreciate the warnings and concern.
    I do have a child theme. So that option is under consideration.

    Peace in this new year.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘404 Errors from /feed/ Added to My Pages’ is closed to new replies.