• Resolved cannibales1974

    (@cannibales1974)


    Hello, in my web I am working with easy digital download and I have about 30 files to download, I want that all these files are not indexed.

    How can I do to add a noindex without having to go accessing each of the downloads?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @cannibales1974,

    Thank you for contacting support.

    You can change the robots meta settings programmatically by editing the following filter: https://rankmath.com/kb/filters-hooks-api-developer/#change-robots-meta

    Here’s an example that should help set all downloads to noindex:
    add_filter( 'rank_math/frontend/robots', function( $robots ) {<br>if( get_post_type() == 'download' ) {<br>$robots['index'] = 'noindex';<br>}<br>return<br>$robots;<br>});

    Hope this helps solve your issues.

    Don’t hesitate to get in touch if you have any other questions.

    • This reply was modified 1 year, 11 months ago by Rank Math Support. Reason: modified the reply
Viewing 1 replies (of 1 total)
  • The topic ‘Apply no index in batch’ is closed to new replies.