0

I recently found that Google Search Console has picked up the RSS links for the individual posts and pages on a client site and is attempting to index them. For example, https://example.com/this-is-a-post/feed/ or https://example.com/about-us/feed/

I've found a number of plugins that will disable RSS for the entire website and a number of code examples that will disable RSS entirely for a given post type. What I'd like to do is keep the main RSS feed intact and just disable the /feed/ endpoint on all pages and posts. Even better would be to respond with 301 redirect request for those URLs to the post itself.

I've done a ton of googling and reading on WordPress' developer docs but have come up empty. Is anyone aware of a solution for this? I would definitely appreciate the help.

3
  • Does this answer your question? Disable feeds for specific custom post types
    – Caleb
    Commented Jul 7, 2023 at 15:18
  • Thanks for replying. Indirectly, maybe. I don't want to remove the entire RSS feed for posts and pages. I just want to remove the /feed/ endpoint and redirect related request to the original post/page. I might be able to use the filter on rewrite_rules_array() and some regex to modify the rule that handles feeds but I'd have to figure out a way to do the redirect separately. I'm hoping for a more direct solution but I'll definitely take a look at this. Thanks. Commented Jul 8, 2023 at 16:31
  • This is also what I'm trying to do wordpress.stackexchange.com/questions/426606/… Commented Sep 4 at 3:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.