How to apply noindex tag in feed url

#646999
Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting us and bringing your concern to our attention.

    You can try to add the following filter on your website to set your feed URLs to noindex:

    function custom_noindex_feeds() {
        if (is_feed()) {
            echo '<meta name="robots" content="noindex,nofollow">' . PHP_EOL;
        }
    }
    add_action('wp_head', 'custom_noindex_feeds');
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘How to apply noindex tag in feed url’ is closed to new replies.