Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to noindex member pages?

  • @originalo

    Participant

    The bbpress member pages for forum replies like http://www.domain.de/users/name/replies/ are already indexed by google search.
    I want to hide these pages from search result pages but my Yoast SEO Plugin does not support this.
    I prefer using “noindex” instead of robots.txt

    Do you have any idea to fix this issue?

Viewing 12 replies - 1 through 12 (of 12 total)
  • @casiepa

    Moderator

    Hi,
    There seem to be multiple pages on Google explaining this on how to set robots.txt, less on the noindex. But note that these are just guidelines for the indexers. The page is still accessible !

    So why not going in protecting the profile for non logged-in users (an indexer is not logged-in!) ? You can check my ‘bbP Toolkit’ where I secure user profiles so they cannot be seen by non logged-in users.

    Pascal.

    @originalo

    Participant

    Making member pages accessible for logged in users only is an interesting workaround. Thanks a lot for this idea.
    Nevertheless I wonder if there is any option to add “noindex” as meta-tag to each member page instead of using robots.txt?

    @originalo

    Participant

    Push… any feedback?

    @originalo

    Participant

    Any other idea? Any feedback is highly appreciated!

    @originalo

    Participant

    I found an answer that solves my question here:

    Meta Title for Profile Pages w/ Yoast SEO

    For those who want to noindex in particular the replies of all mebers just add

    <META NAME=”ROBOTS” CONTENT=”NOINDEX, NOFOLLOW” />

    to the “user-replies-created.php” in the folder
    wordpress > wp-content > plugins > bbpress > templates > default > bbpress

    @bimmerime

    Participant

    Where does that code goes exactly?!! also wouldn’t you want to nonindex the “users subscriptions”, “favorites”, and “topics started” as well ??

    @kalusha

    Participant

    Hello,

    so what is the right way to noindex member pages?

    thank you

    @kalusha

    Participant

    I have now put this in robots.txt
    Disallow: /users/

    is that right?

    hope anybody can help me..

    @kalusha

    Participant

    any News???

    @pyoil

    Participant

    If you are using SEO Yoast Plugin you can do the following to your functions.php to update the robots meta tags.

    
    function noindex_profile($html) {
      	if (bbp_is_single_user()){
    	  	$html = "noindex,nofollow";
    	} 
    	  return $html;
    }
    add_action( 'wpseo_robots', 'noindex_profile' ); 
    

    If you are not using any plugin or don’t see any robot tags to update in your userprofile, use the below instead and the insertion will be made in the head

    
    function noindex_profile() {
      	if (bbp_is_single_user()){
      	  	echo '<META NAME=”ROBOTS” CONTENT=”NOINDEX, NOFOLLOW” />' ;
      	}
    }
    add_action( 'wp_head', 'noindex_profile' );
    

    Hope this helps.

    @robin-w

    Moderator

    great – thanks for posting your solution 🙂

    @rodgersnigel

    Participant

    Hi,

    I just did something similar for Rank Math SEO plugin:

    
    
    /**
     * Sets bbPress user profile pages to noindex
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
        
        if (!bbp_is_single_user_profile()) {
            return $robots;
            }
        unset( $robots['index']);
        $robots['noindex'] = 'noindex';
        return $robots;
    });
    

    Cheers

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Skip to toolbar