Assistance Needed with Applying Noindex to Feed Pages

#711919
  • Resolved Ahmet Yusuf Albayrak
    Rank Math free

    Dear RankMath Support Team,

    I hope this message finds you well. I am reaching out for assistance with an issue I’ve encountered while using the RankMath SEO plugin on my WordPress site, specifically related to applying the noindex directive to my feed pages.

    Website URL: https://inspireyourneeds.com/
    RankMath Version: 1.0.208.1

    Issue Description:
    I have been trying to add a noindex tag to the feed pages on my website, but despite my efforts, the tag does not seem to be applying correctly. The objective is to prevent these feed pages from being indexed by search engines.

    Steps I Have Taken:

    Manual Code Attempt: I tried adding custom code to my theme’s functions.php file to set the X-Robots-Tag: noindex, follow HTTP header for feed pages. Here’s the code snippet I used:

    Functions.PHP

    function enforce_noindex_on_feeds() {
    if (is_feed()) {
    header(‘X-Robots-Tag: noindex, follow’, true);
    }
    }
    add_action(‘template_redirect’, ‘enforce_noindex_on_feeds’);
    RankMath Configuration: I have also attempted to configure this setting through the RankMath plugin, but it seems like the changes are not taking effect.

    Caching and Conflicts: I have cleared all site caches and checked for potential plugin conflicts, but the issue persists.

    Assistance Requested:
    I would greatly appreciate your guidance on how to properly set up the noindex tag for feed pages using RankMath. If there are specific settings or steps within the RankMath plugin that I should follow, please advise. Additionally, any insights into why the manual code approach is not working would be helpful.

    Thank you for your time and assistance. I look forward to your valuable input on resolving this issue.

    Best regards,
    Ahmet Albayrak

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The ticket ‘Assistance Needed with Applying Noindex to Feed Pages’ is closed to new replies.